[Lldb-commits] [lldb] [lldb] Fix format string (PR #204837)

via lldb-commits lldb-commits at lists.llvm.org
Fri Jun 19 07:17:23 PDT 2026


llvmorg-github-actions[bot] wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-lldb

Author: Sergei Barannikov (s-barannikov)

<details>
<summary>Changes</summary>

GetLoadAddress() returns an integer value, not a null-terminated string.

---
Full diff: https://github.com/llvm/llvm-project/pull/204837.diff


1 Files Affected:

- (modified) lldb/source/Target/Target.cpp (+2-2) 


``````````diff
diff --git a/lldb/source/Target/Target.cpp b/lldb/source/Target/Target.cpp
index 3076cbd1b3781..ebb66b559841e 100644
--- a/lldb/source/Target/Target.cpp
+++ b/lldb/source/Target/Target.cpp
@@ -3087,8 +3087,8 @@ Target::ReadInstructions(const Address &start_addr, uint32_t count,
                  force_live_memory, &load_addr);
 
   if (error.Fail())
-    return llvm::createStringError(
-        error.AsCString("Target::ReadInstructions failed to read memory at %s"),
+    return llvm::createStringErrorV(
+        error.AsCString("Target::ReadInstructions failed to read memory at {}"),
         start_addr.GetLoadAddress(this));
 
   const bool data_from_file = load_addr == LLDB_INVALID_ADDRESS;

``````````

</details>


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


More information about the lldb-commits mailing list