[Lldb-commits] [PATCH] D133534: Complete support of loading a darwin kernel over a live gdb-remote connection given the address of a mach-o fileset

Jonas Devlieghere via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Sep 9 14:29:11 PDT 2022


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

A small comment but otherwise this LGTM.



================
Comment at: lldb/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.cpp:924
+                                           addr_t input_addr) {
+  Status error;
+  WritableDataBufferSP header_data(new DataBufferHeap(512, 0));
----------------
Looks like we're never checking this status below. Is there any chance that `ReadMemory` succeeds but the status is set to an error? If not, should we add an assert? 


================
Comment at: lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp:597-601
+          if (GetTarget()
+                  .GetDebugger()
+                  .GetPlatformList()
+                  .LoadPlatformBinaryAndSetup(this, addr, notify))
+            continue;
----------------
This is the crux of the patch. I think it would be helpful here to explain what's going on, i.e. that we give the platform a chance first, before deferring to the DynamicLoader.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D133534



More information about the lldb-commits mailing list