[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
Thu Oct 27 17:21:33 PDT 2022


zequanwu updated this revision to Diff 471337.
zequanwu added a comment.

- Modify file spec of placeholder object file.
- Change it to "(not loaded)" which is more obvious than "(placeholder)".
- Use prefix so the file extension is preseved.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D136795

Files:
  lldb/source/Plugins/Process/minidump/ProcessMinidump.cpp
  lldb/test/Shell/Minidump/modules-not-loaded.yaml


Index: lldb/test/Shell/Minidump/modules-not-loaded.yaml
===================================================================
--- /dev/null
+++ lldb/test/Shell/Minidump/modules-not-loaded.yaml
@@ -0,0 +1,23 @@
+# REQUIRES: x86
+
+# RUN: yaml2obj %s -o %t
+# RUN: %lldb -c %t -o "target modules list" 2>&1 | FileCheck %s
+
+# CHECK:      (lldb) target modules list
+# CHEKC-NEXT: [  0] 04000000-1400-0000-0300-0000474E5500 0x00001000 (not loaded) /invalid/path/on/current/system/libbreakpad.so
+
+--- !minidump
+Streams:
+  - Type:            SystemInfo
+    Processor Arch:  ARM
+    Platform ID:     Linux
+    CSD Version:     '15E216'
+    CPU:
+      CPUID:           0x00000000
+  - Type:            ModuleList
+    Modules:
+      - Base of Image:   0x0000000000001000
+        Size of Image:   0x00001000
+        Module Name:     '/invalid/path/on/current/system/libbreakpad.so'
+        CodeView Record: 52534453040000001400000003000000474e55000000000000
+...
Index: lldb/source/Plugins/Process/minidump/ProcessMinidump.cpp
===================================================================
--- lldb/source/Plugins/Process/minidump/ProcessMinidump.cpp
+++ lldb/source/Plugins/Process/minidump/ProcessMinidump.cpp
@@ -598,7 +598,7 @@
                "Unable to locate the matching object file, creating a "
                "placeholder module for: {0}",
                name);
-
+      module_spec.GetFileSpec().PrependPathComponent("(not loaded) ");
       module_sp = Module::CreateModuleFromObjectFile<PlaceholderObjectFile>(
           module_spec, load_addr, load_size);
       GetTarget().GetImages().Append(module_sp, true /* notify */);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D136795.471337.patch
Type: text/x-patch
Size: 1652 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20221028/1ee9d947/attachment.bin>


More information about the lldb-commits mailing list