[Lldb-commits] [PATCH] D136795: [LLDB] Mark placeholder modules in `target module list` output.

Zequan Wu via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Oct 26 14:51:03 PDT 2022


zequanwu created this revision.
zequanwu added a reviewer: labath.
Herald added a project: All.
zequanwu requested review of this revision.
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.

Minidump may contain modules that are created from placeholder object files if
they are not loaded. Add a `(placeholder)` suffix to indicate they are not
loaded, which is more clear than checking if the address is 0x0 in
`target module list -o`.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D136795

Files:
  lldb/source/Commands/CommandObjectTarget.cpp


Index: lldb/source/Commands/CommandObjectTarget.cpp
===================================================================
--- lldb/source/Commands/CommandObjectTarget.cpp
+++ lldb/source/Commands/CommandObjectTarget.cpp
@@ -3110,11 +3110,14 @@
         DumpModuleArchitecture(strm, module, true, width);
         break;
 
-      case 'f':
+      case 'f': {
         DumpFullpath(strm, &module->GetFileSpec(), width);
         dump_object_name = true;
+        ObjectFile *objfile = module->GetObjectFile();
+        if (objfile && objfile->GetPluginName() == "placeholder")
+          strm.Printf(" (placeholder)");
         break;
-
+      }
       case 'd':
         DumpDirectory(strm, &module->GetFileSpec(), width);
         break;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D136795.470942.patch
Type: text/x-patch
Size: 736 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20221026/f31bc430/attachment.bin>


More information about the lldb-commits mailing list