[Lldb-commits] [PATCH] D157160: Surface error messages from the DebugSymbols DBGShellCommands external agent; add logging for LC_NOTEs in Mach-O corefiles

Jonas Devlieghere via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Aug 8 14:49:44 PDT 2023


JDevlieghere accepted this revision.
JDevlieghere added a comment.
This revision is now accepted and ready to land.

LGTM



================
Comment at: lldb/source/Core/DynamicLoader.cpp:241-242
+                 error.AsCString("")[0] != '\0') {
+        Stream &s = target.GetDebugger().GetErrorStream();
+        s << error.AsCString();
       }
----------------
If you don't need the Stream anymore you could do 

```
target.GetDebugger().GetErrorStream() << error.AsCString();
```


================
Comment at: lldb/source/Core/DynamicLoader.cpp:273-277
           LLDB_LOGF(log,
                     "DynamicLoader::LoadBinaryWithUUIDAndAddress Loading "
-                    "binary UUID %s at %s 0x%" PRIx64,
-                    uuid.GetAsString().c_str(),
+                    "binary %s UUID %s at %s 0x%" PRIx64,
+                    name.str().c_str(), uuid.GetAsString().c_str(),
                     value_is_offset ? "offset" : "address", value);
----------------
LLDB_LOG could simplify this a lot ;-)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D157160/new/

https://reviews.llvm.org/D157160



More information about the lldb-commits mailing list