[Lldb-commits] [lldb] [lldb][Docs] Document vFile:exists and vFile:MD5 (PR #89357)
DavidSpickett wrote: Landed as markdown in https://github.com/llvm/llvm-project/commit/bd53c7cce418fe7f3e171859d4718df15d03dc2b. https://github.com/llvm/llvm-project/pull/89357 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [lldb][Docs] Document vFile:exists and vFile:MD5 (PR #89357)
https://github.com/DavidSpickett closed https://github.com/llvm/llvm-project/pull/89357 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [lldb][Docs] Document vFile:exists and vFile:MD5 (PR #89357)
DavidSpickett wrote: I forgot I didn't land this, so I will instead push a Markdown version of the same content once the other PRs have landed. https://github.com/llvm/llvm-project/pull/89357 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [lldb][Docs] Document vFile:exists and vFile:MD5 (PR #89357)
@@ -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, +// 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 DavidSpickett wrote: Done. https://github.com/llvm/llvm-project/pull/89357 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [lldb][Docs] Document vFile:exists and vFile:MD5 (PR #89357)
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 Date: Fri, 19 Apr 2024 09:15:54 + 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, +// 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 Date: Mon, 22 Apr 2024 11:58:55 + 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. ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [lldb][Docs] Document vFile:exists and vFile:MD5 (PR #89357)
@@ -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, +// 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 DavidSpickett wrote: We do: ``` auto Result = llvm::sys::fs::md5_contents(path); ``` Then if we look into that, I see: ``` uint64_t low() const { // Our MD5 implementation returns the result in little endian, so the low // word is first. ``` I guess that `md5sum` shows the result as a 128 bit number in the usual "big endian" style. As to why the result might be entirely different, perhaps you were seeing the little endian difference but if not, no idea why. As you say if it's incorrect then it's been so for a long time. https://github.com/llvm/llvm-project/pull/89357 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [lldb][Docs] Document vFile:exists and vFile:MD5 (PR #89357)
https://github.com/hawkinsw commented: I hate when I can only contribute nits, but I wanted to try to be helpful! https://github.com/llvm/llvm-project/pull/89357 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [lldb][Docs] Document vFile:exists and vFile:MD5 (PR #89357)
@@ -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, +// 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 hawkinsw wrote: ```suggestion // bits of the result, and finally the high 64 bits of the result. Both are in hex format ``` https://github.com/llvm/llvm-project/pull/89357 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [lldb][Docs] Document vFile:exists and vFile:MD5 (PR #89357)
https://github.com/hawkinsw edited https://github.com/llvm/llvm-project/pull/89357 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [lldb][Docs] Document vFile:exists and vFile:MD5 (PR #89357)
https://github.com/Awfa edited https://github.com/llvm/llvm-project/pull/89357 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [lldb][Docs] Document vFile:exists and vFile:MD5 (PR #89357)
@@ -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, +// 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 Awfa wrote: By the way, I remember observing that the hash that comes out from `CalculateMD5` differed from the `md5sum` command before. Like entirely - not just the halves swapped. https://github.com/llvm/llvm-project/pull/89357 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [lldb][Docs] Document vFile:exists and vFile:MD5 (PR #89357)
@@ -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, +// 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 emaste wrote: As an aside does this mean that the hash as seen in the packet has the low and high 64 bits swapped from what would be displayed by e.g. the md5 command? For example `e9800998ecf8427ed41d8cd98f00b204` for an empty file rather than `d41d8cd98f00b204e9800998ecf8427e` https://github.com/llvm/llvm-project/pull/89357 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [lldb][Docs] Document vFile:exists and vFile:MD5 (PR #89357)
DavidSpickett wrote: Ideally they'd be in some sort of order but they are already not, and I'm thinking it would be good to get these on the website anyway. So I'm leaving concerns like that until later. https://github.com/llvm/llvm-project/pull/89357 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [lldb][Docs] Document vFile:exists and vFile:MD5 (PR #89357)
llvmbot wrote: @llvm/pr-subscribers-lldb Author: David Spickett (DavidSpickett) Changes 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 --- Full diff: https://github.com/llvm/llvm-project/pull/89357.diff 1 Files Affected: - (modified) lldb/docs/lldb-platform-packets.txt (+36) ``diff 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, +// 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. `` https://github.com/llvm/llvm-project/pull/89357 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [lldb][Docs] Document vFile:exists and vFile:MD5 (PR #89357)
https://github.com/DavidSpickett created https://github.com/llvm/llvm-project/pull/89357 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 >From 518cb052ee364192fc5c813a2962f80f39345cd5 Mon Sep 17 00:00:00 2001 From: David Spickett Date: Fri, 19 Apr 2024 09:15:54 + Subject: [PATCH] [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, +// 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. ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits