[Lldb-commits] [PATCH] D116211: With firmware debug sess, if gdb stub knows the UUID/address of binary, try to load it

Jonas Devlieghere via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Dec 23 11:23:28 PST 2021


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

LGMT



================
Comment at: lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp:584
+
+          if (!module_sp.get()) {
+            // Force a an external lookup, if that tool is available.
----------------
The `.get()` is redundant.


================
Comment at: lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp:613-617
+                if (log)
+                  log->Printf("Loading binary UUID %s at %s 0x%" PRIx64,
+                              standalone_uuid.GetAsString().c_str(),
+                              standalone_value_is_offset ? "offset" : "address",
+                              standalone_value);
----------------
Use `LLDB_LOG` which has the `if(log)` inlined in the macro. 

```
LLDB_LOG(log, "Loading binary UUID %s at %s 0x%" PRIx64,
                              standalone_uuid.GetAsString().c_str(),
                              standalone_value_is_offset ? "offset" : "address",
                              standalone_value);
```

Same below.


================
Comment at: lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp:626-627
+                              standalone_uuid.GetAsString().c_str());
+                const bool value_is_slide = true;
+                module_sp->SetLoadAddress(target, 0, value_is_slide, changed);
+              }
----------------
Same comment as in D116094, but since you didn't change it there, let's keep it consistent. 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D116211



More information about the lldb-commits mailing list