[Lldb-commits] [lldb] [lldb][Docs] Document vFile:exists and vFile:MD5 (PR #89357)

David Spickett via lldb-commits lldb-commits at lists.llvm.org
Mon Apr 22 04:59:33 PDT 2024


https://github.com/DavidSpickett updated https://github.com/llvm/llvm-project/pull/89357

>From 518cb052ee364192fc5c813a2962f80f39345cd5 Mon Sep 17 00:00:00 2001
From: David Spickett <david.spickett at linaro.org>
Date: Fri, 19 Apr 2024 09:15:54 +0000
Subject: [PATCH 1/2] [lldb][Docs] Document vFile:exists and vFile:MD5

These are extensions the lldb platform has to:
https://sourceware.org/gdb/current/onlinedocs/gdb.html/Host-I_002fO-Packets.html#Host-I_002fO-Packets
---
 lldb/docs/lldb-platform-packets.txt | 36 +++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)

diff --git a/lldb/docs/lldb-platform-packets.txt b/lldb/docs/lldb-platform-packets.txt
index 4cf575e5ee8adb..fa6ec720c7ed42 100644
--- a/lldb/docs/lldb-platform-packets.txt
+++ b/lldb/docs/lldb-platform-packets.txt
@@ -429,7 +429,43 @@ incompatible with the flags that gdb specifies.
 //
 //  Response is F, followed by the number of bytes written (base 16)
 
+//----------------------------------------------------------------------
+// vFile:MD5:
+//
+// BRIEF
+//  Generate an MD5 hash of the file at the given path.
+//
+// EXAMPLE
+//
+//  receive: vFile:MD5:2f746d702f61
+//  send (success): F,00000000000000001111111111111111
+//  send (failure): F,x
+//
+//  request packet contains the ASCII hex encoded filename
+//
+//  If the hash succeeded, the response is "F," followed by the low 64
+//  bits of the result, then the high 64 bits of the result. Both are hex
+//  without a prefix.
+//
+//  The response is "F,", followed by "x" if the file did not exist
+//  or failed to hash.
 
+//----------------------------------------------------------------------
+// vFile:exists:
+//
+// BRIEF
+//  Check whether the file at the given path exists.
+//
+// EXAMPLE
+//
+//  receive: vFile:exists:2f746d702f61
+//  send         (exists): F,1
+//  send (does not exist): F,0
+//
+//  request packet contains the ASCII hex encoded filename
+//
+//  The response is a return code where 1 means the file exists
+//  and 0 means it does not.
 
 
 

>From b88a1159bdbb4b4d93f3b5ef10741abd4ef935ee Mon Sep 17 00:00:00 2001
From: David Spickett <david.spickett at linaro.org>
Date: Mon, 22 Apr 2024 11:58:55 +0000
Subject: [PATCH 2/2] Wording

---
 lldb/docs/lldb-platform-packets.txt | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lldb/docs/lldb-platform-packets.txt b/lldb/docs/lldb-platform-packets.txt
index fa6ec720c7ed42..1be369910fa4db 100644
--- a/lldb/docs/lldb-platform-packets.txt
+++ b/lldb/docs/lldb-platform-packets.txt
@@ -444,8 +444,8 @@ incompatible with the flags that gdb specifies.
 //  request packet contains the ASCII hex encoded filename
 //
 //  If the hash succeeded, the response is "F," followed by the low 64
-//  bits of the result, then the high 64 bits of the result. Both are hex
-//  without a prefix.
+//  bits of the result, and finally the high 64 bits of the result. Both are in
+//  hex format without a prefix.
 //
 //  The response is "F,", followed by "x" if the file did not exist
 //  or failed to hash.



More information about the lldb-commits mailing list