[Lldb-commits] [lldb] [lldb-dap] Support inspecting memory (PR #104317)
via lldb-commits
lldb-commits at lists.llvm.org
Wed Aug 14 15:37:34 PDT 2024
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 82ee31f75ac1316006fa9e21dddfddec37cf7072 e01ea18961bbae0fb747b312670946bd768c5d73 --extensions cpp,h -- lldb/test/API/tools/lldb-dap/memory/main.cpp lldb/tools/lldb-dap/JSONUtils.cpp lldb/tools/lldb-dap/JSONUtils.h lldb/tools/lldb-dap/lldb-dap.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/lldb/test/API/tools/lldb-dap/memory/main.cpp b/lldb/test/API/tools/lldb-dap/memory/main.cpp
index 95ecde82ea..807b010d24 100644
--- a/lldb/test/API/tools/lldb-dap/memory/main.cpp
+++ b/lldb/test/API/tools/lldb-dap/memory/main.cpp
@@ -1,10 +1,10 @@
-#include <memory>
#include <iostream>
+#include <memory>
int main() {
- int not_a_ptr = 666;
- const char* rawptr = "dead";
- std::unique_ptr<int> smartptr(new int(42));
- // Breakpoint
- return 0;
+ int not_a_ptr = 666;
+ const char *rawptr = "dead";
+ std::unique_ptr<int> smartptr(new int(42));
+ // Breakpoint
+ return 0;
}
diff --git a/lldb/tools/lldb-dap/JSONUtils.cpp b/lldb/tools/lldb-dap/JSONUtils.cpp
index dc8932d5f3..b340c4e4a2 100644
--- a/lldb/tools/lldb-dap/JSONUtils.cpp
+++ b/lldb/tools/lldb-dap/JSONUtils.cpp
@@ -1274,7 +1274,6 @@ llvm::json::Value CreateVariable(lldb::SBValue v, int64_t variablesReference,
else
object.try_emplace("variablesReference", (int64_t)0);
-
if (lldb::addr_t addr = GetMemoryReference(v); addr != LLDB_INVALID_ADDRESS) {
object.try_emplace("memoryReference", "0x" + llvm::utohexstr(addr));
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/104317
More information about the lldb-commits
mailing list