[Lldb-commits] [lldb] [debugserver] Support for `qMemTags` packet (PR #160952)

via lldb-commits lldb-commits at lists.llvm.org
Fri Sep 26 14:29:11 PDT 2025


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff origin/main HEAD --extensions c,cpp,h -- lldb/test/API/macosx/mte/main.c lldb/tools/debugserver/source/DNB.cpp lldb/tools/debugserver/source/DNB.h lldb/tools/debugserver/source/DNBDefs.h lldb/tools/debugserver/source/MacOSX/MachTask.h lldb/tools/debugserver/source/MacOSX/MachVMMemory.cpp lldb/tools/debugserver/source/MacOSX/MachVMMemory.h lldb/tools/debugserver/source/MacOSX/MachVMRegion.cpp lldb/tools/debugserver/source/MacOSX/MachVMRegion.h lldb/tools/debugserver/source/RNBRemote.cpp lldb/tools/debugserver/source/RNBRemote.h
``````````

:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/lldb/test/API/macosx/mte/main.c b/lldb/test/API/macosx/mte/main.c
index ca61c05b1..e3dd0119d 100644
--- a/lldb/test/API/macosx/mte/main.c
+++ b/lldb/test/API/macosx/mte/main.c
@@ -11,7 +11,7 @@ uint8_t *allocate(void) { return my_malloc(); }
 void my_free(void *ptr) { free(ptr); }
 void deallocate(void *ptr) { my_free(ptr); }
 
-void touch_memory(uint8_t *ptr) { ptr[7] = 1; }  // invalid access
+void touch_memory(uint8_t *ptr) { ptr[7] = 1; } // invalid access
 void modify(uint8_t *ptr) { touch_memory(ptr); }
 
 int main() {
@@ -19,11 +19,11 @@ int main() {
   printf("ptr: %p\n", ptr);
 
   strcpy((char *)ptr, "Hello");
-  strcpy((char *)ptr+16, "World");
+  strcpy((char *)ptr + 16, "World");
 
-  deallocate(ptr);  // before free
+  deallocate(ptr); // before free
 
-  modify(ptr);  // use-after-free
+  modify(ptr); // use-after-free
 
   return 0;
 }
diff --git a/lldb/tools/debugserver/source/RNBRemote.cpp b/lldb/tools/debugserver/source/RNBRemote.cpp
index be7108f63..434e9cfa4 100644
--- a/lldb/tools/debugserver/source/RNBRemote.cpp
+++ b/lldb/tools/debugserver/source/RNBRemote.cpp
@@ -4326,7 +4326,7 @@ rnb_err_t RNBRemote::HandlePacket_MemoryRegionInfo(const char *p) {
       ostrm << "flags:";
       for (size_t i = 0; i < region_info.flags.size(); i++) {
         if (i != 0)
-          ostrm << " ";  // Separator is whitespace
+          ostrm << " "; // Separator is whitespace
         ostrm << region_info.flags[i];
       }
       ostrm << ";";

``````````

</details>


https://github.com/llvm/llvm-project/pull/160952


More information about the lldb-commits mailing list