[Lldb-commits] [lldb] 882d025 - Improve the executable name detection in ELF core files. (#197341)

via lldb-commits lldb-commits at lists.llvm.org
Wed May 13 16:47:04 PDT 2026


Author: Greg Clayton
Date: 2026-05-13T16:46:59-07:00
New Revision: 882d0251d44fa2db8dd6e5817a8baa72237f77c7

URL: https://github.com/llvm/llvm-project/commit/882d0251d44fa2db8dd6e5817a8baa72237f77c7
DIFF: https://github.com/llvm/llvm-project/commit/882d0251d44fa2db8dd6e5817a8baa72237f77c7.diff

LOG: Improve the executable name detection in ELF core files. (#197341)

A previous commit switched us to use the value of the AT_EXECFN, which
is an entry in the aux vector, as the executable path. As it turns out,
if a symlink is used to launch a program, the symlink path will be in
the AT_EXECFN string in core file memory. The PRPSINFO also contains a
basename of the program, and it will also be the symlink basename. The
best source of information to figure out the executable name is from the
NT_FILE note. This always has the resolved path to the executable.

Now the executable name is found in a reliable way starting with finding
the NT_FILE entry for the main executable. This can reliably be done by
finding the NT_FILE entry whose address contains the AT_PHDR aux vector
value. This value is the address of the program headers for the main
executable. If there is no NT_FILE entry we can find, we fall back to
the AT_EXECFN entry from memory and then fallback to the basename in the
PRPSINFO. This patch also creates a placeholder as the main executable
when the executable can't be found to ensure users can see which
executable they will need to track down in order to load the core file.

The tests added will test the order of precedence. It does this by
creating a core file with:
- NT_FILE entry with a path of "/path/nt_file_foo"
- AT_EXECFN in the aux vector with a path of "/path/execfn_foo"
- NT_PRPSINFO entry with a path of "prpsinfo_foo"

We then test that the correct entry is found as the best path option is
removed from the core file.

Added: 
    lldb/test/API/functionalities/postmortem/elf-core/elf-NT_FILE-NT_PRPSINFO-AT_EXECFN.yaml
    lldb/test/API/functionalities/postmortem/elf-core/elf-NT_PRPSINFO-AT_EXECFN.yaml
    lldb/test/API/functionalities/postmortem/elf-core/elf-NT_PRPSINFO.yaml

Modified: 
    lldb/source/Plugins/Process/elf-core/ProcessElfCore.cpp
    lldb/source/Plugins/Process/elf-core/ProcessElfCore.h
    lldb/test/API/functionalities/postmortem/elf-core/TestLinuxCore.py

Removed: 
    


################################################################################
diff  --git a/lldb/source/Plugins/Process/elf-core/ProcessElfCore.cpp b/lldb/source/Plugins/Process/elf-core/ProcessElfCore.cpp
index dffbdceffc9cb..d79cd7e51f1b8 100644
--- a/lldb/source/Plugins/Process/elf-core/ProcessElfCore.cpp
+++ b/lldb/source/Plugins/Process/elf-core/ProcessElfCore.cpp
@@ -28,6 +28,7 @@
 
 #include "Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.h"
 #include "Plugins/ObjectFile/ELF/ObjectFileELF.h"
+#include "Plugins/ObjectFile/Placeholder/ObjectFilePlaceholder.h"
 #include "Plugins/Process/elf-core/RegisterUtilities.h"
 #include "ProcessElfCore.h"
 #include "ThreadElfCore.h"
@@ -199,10 +200,10 @@ Status ProcessElfCore::DoLoadCore() {
   /// PT_AARCH64_MEMTAG_MTE - Contains AArch64 MTE memory tags for a range of
   ///                         Process Address Space.
   for (const elf::ELFProgramHeader &H : segments) {
-    DataExtractor data = core->GetSegmentData(H);
 
     // Parse thread contexts and auxv structure
     if (H.p_type == llvm::ELF::PT_NOTE) {
+      DataExtractor data = core->GetSegmentData(H);
       if (llvm::Error error = ParseThreadContextsFromNoteSegment(H, data))
         return Status::FromError(std::move(error));
     }
@@ -256,42 +257,43 @@ Status ProcessElfCore::DoLoadCore() {
   // the main executable using data we found in the core file notes.
   lldb::ModuleSP exe_module_sp = GetTarget().GetExecutableModule();
   if (!exe_module_sp) {
-    if (!m_nt_file_entries.empty()) {
-      std::string executable_path = GetMainExecutablePath();
-      ModuleSpec exe_module_spec;
-      exe_module_spec.GetArchitecture() = arch;
-      exe_module_spec.GetUUID() = FindModuleUUID(executable_path);
-      exe_module_spec.GetFileSpec().SetFile(executable_path,
-                                            FileSpec::Style::native);
-      if (exe_module_spec.GetFileSpec()) {
-        exe_module_sp =
-            GetTarget().GetOrCreateModule(exe_module_spec, true /* notify */);
+    ModuleSpec exe_module_spec;
+    if (GetMainExecutableModuleSpec(exe_module_spec)) {
+      exe_module_sp =
+          GetTarget().GetOrCreateModule(exe_module_spec, true /* notify */);
+      if (!exe_module_sp) {
+        // Create an ELF file from memory for the main executable. The dynamic
+        // loader requires the main executable so that it can extract the
+        // DT_DEBUG key/value pair from the dynamic section and get the list
+        // of shared libraries.
+        std::optional<NT_FILE_Entry> exe_header =
+            GetNTFileEntryForExecutableELFHeader();
+        if (exe_header) {
+          if (llvm::Expected<lldb::ModuleSP> module_sp_or_err =
+                  ReadModuleFromMemory(exe_module_spec.GetFileSpec(),
+                                       exe_header->start,
+                                       exe_header->end - exe_header->start))
+            exe_module_sp = *module_sp_or_err;
+          else
+            llvm::consumeError(module_sp_or_err.takeError());
+        }
+        // Create a placeholder module for the main executable if we failed to
+        // create an ELF module from memory.
         if (!exe_module_sp) {
-          // Create an ELF file from memory for the main executable. The dynamic
-          // loader requires the main executable so that it can extract the
-          // DT_DEBUG key/value pair from the dynamic section and get the list
-          // of shared libraries.
-          std::optional<lldb::addr_t> exe_header_addr;
-
-          // We need to find its load address
-          for (const NT_FILE_Entry &file_entry : m_nt_file_entries) {
-            if (file_entry.path == executable_path) {
-              exe_header_addr = file_entry.start;
-              break;
-            }
-          }
-          if (exe_header_addr) {
-            if (llvm::Expected<lldb::ModuleSP> module_sp_or_err =
-                    ReadModuleFromMemory(exe_module_spec.GetFileSpec(),
-                                         *exe_header_addr))
-              exe_module_sp = *module_sp_or_err;
-            else
-              llvm::consumeError(module_sp_or_err.takeError());
-          }
+          lldb::addr_t load_addr =
+              exe_header ? exe_header->start : LLDB_INVALID_ADDRESS;
+          lldb::addr_t size =
+              exe_header ? (exe_header->end - exe_header->start) : 0;
+          exe_module_sp =
+              Module::CreateModuleFromObjectFile<ObjectFilePlaceholder>(
+                  exe_module_spec, load_addr, size);
+          if (exe_module_spec.GetPlatformFileSpec())
+            exe_module_sp->SetPlatformFileSpec(
+                exe_module_spec.GetPlatformFileSpec());
         }
-        if (exe_module_sp)
-          GetTarget().SetExecutableModule(exe_module_sp, eLoadDependentsNo);
       }
+      if (exe_module_sp)
+        GetTarget().SetExecutableModule(exe_module_sp, eLoadDependentsNo);
     }
   }
   return error;
@@ -313,30 +315,69 @@ void ProcessElfCore::UpdateBuildIdForNTFileEntries() {
   }
 }
 
-std::string ProcessElfCore::GetMainExecutablePath() {
-  // Always try to read the program name from core file memory first via the
-  // AUXV_AT_EXECFN entry. This value is the address of a null terminated C
-  // string that contains the program path.
+/// Correctly create a FileSpec from a path found in a core file.
+///
+/// This method will guess the path style more intelligently that specifying
+/// a native path style since core files can contain paths from a 
diff erent
+/// system than the host system.
+static FileSpec CreateFileSpecFromPath(llvm::StringRef path) {
+  FileSpec::Style path_style = FileSpec::Style::native;
+  if (auto guessed_style = FileSpec::GuessPathStyle(path))
+    path_style = *guessed_style;
+  return FileSpec(path, path_style);
+}
+
+bool ProcessElfCore::GetMainExecutableModuleSpec(ModuleSpec &exe_spec) {
   AuxVector aux_vector(m_auxv);
-  std::string execfn_str;
+  exe_spec.GetArchitecture() = GetTarget().GetArchitecture();
+
+  // Find the NT_FILE_Entry for the main executable's ELF header.
+  std::optional<NT_FILE_Entry> exe_header =
+      GetNTFileEntryForExecutableELFHeader();
+  if (exe_header) {
+    exe_spec.GetFileSpec() = CreateFileSpecFromPath(exe_header->path);
+    exe_spec.GetUUID() = FindModuleUUID(exe_header->path);
+  }
+
+  // If we failed to find the executable program in the NT_FILE list with the
+  // program header address, then we can read the executable name from the value
+  // of the AUXV_AT_EXECFN in the AUX vector. The reason we don't use this file
+  // all of the time is if the program is launched using a symlink, the value of
+  // the AUXV_AT_EXECFN string will be the symlink itself. The same goes for the
+  // m_executable_name found in the NT_PRPSINFO section, it will be the name of
+  // the symlink. Even if we did find a path above, we want to fill in this path
+  // if it is 
diff erent from main executable's path in the platform file name
+  // in case someone needs to know how the executable was launched.
   if (auto execfn = aux_vector.GetAuxValue(AuxVector::AUXV_AT_EXECFN)) {
     Status error;
-    if (ReadCStringFromMemory(*execfn, execfn_str, error))
-      return execfn_str;
+    std::string execfn_str;
+    if (ReadCStringFromMemory(*execfn, execfn_str, error)) {
+      // This path can be a symlink path. Set it as the main file spec if one
+      // hasn't been set, else set the platform file spec.
+      FileSpec execfn_spec = CreateFileSpecFromPath(execfn_str);
+      if (exe_spec.GetFileSpec()) {
+        // Fill in the platform file spec if it 
diff ers from the main path from
+        // the resolved file info in the NT_FILE note.
+        if (exe_spec.GetFileSpec() != execfn_spec)
+          exe_spec.GetPlatformFileSpec() = execfn_spec;
+      } else {
+        // We don't have an executable file spec yet, lets set it.
+        exe_spec.GetFileSpec() = execfn_spec;
+        exe_spec.GetUUID() = FindModuleUUID(execfn_str);
+      }
+    }
   }
 
-  if (m_nt_file_entries.empty())
-    return {};
-
-  // The first entry in the NT_FILE might be our executable
-  std::string executable_path = m_nt_file_entries[0].path;
-  // Prefer the NT_FILE entry matching m_executable_name as main executable.
-  for (const NT_FILE_Entry &file_entry : m_nt_file_entries)
-    if (llvm::StringRef(file_entry.path).ends_with("/" + m_executable_name)) {
-      executable_path = file_entry.path;
-      break;
-    }
-  return executable_path;
+  // If we didn't set the executable file spec yet, lets set it from the info
+  // from the NT_PRPSINFO. This usually is just a basename of the actual path
+  // used to launch the binary, so this can be a symlink basename. But it will
+  // be better than nothing since we will create a placeholder module for any
+  // files that don't exist.
+  if (!exe_spec.GetFileSpec() && !m_executable_name.empty())
+    exe_spec.GetFileSpec() = CreateFileSpecFromPath(m_executable_name);
+
+  // We succeeded if we got a path.
+  return (bool)exe_spec.GetFileSpec();
 }
 
 UUID ProcessElfCore::FindModuleUUID(const llvm::StringRef path) {
@@ -1167,3 +1208,51 @@ bool ProcessElfCore::GetProcessInfo(ProcessInstanceInfo &info) {
   info.SetArguments(m_process_args.as_args(), /*first_arg_is_executable=*/true);
   return true;
 }
+
+/// Find the NT_FILE entry that contains an address.
+std::optional<ProcessElfCore::NT_FILE_Entry>
+ProcessElfCore::GetNTFileEntryContainingAddress(lldb::addr_t addr) {
+  for (const NT_FILE_Entry &file_entry : m_nt_file_entries) {
+    if (file_entry.start <= addr && addr < file_entry.end)
+      return file_entry;
+  }
+  return std::nullopt;
+}
+
+std::optional<ProcessElfCore::NT_FILE_Entry>
+ProcessElfCore::GetNTFileEntryForExecutableELFHeader() {
+  /// This method will search for the first NT_FILE entry that contains the
+  /// executable's ELF header. We use the AUXV_AT_PHDR from the aux vector to
+  /// find the address of the main executable's program headers and then find
+  /// the NT_FILE entry that contains this address.
+  ///
+  /// Previously we would try to find the first NT_FILE entry that had a path
+  /// that ended with the executable name found in the NT_PRPSINFO note, but
+  /// this basename can be the name of a symlink and not the actual resolved
+  /// executable file found in the NT_FILE entry so this could fail for cases
+  /// where a symlink was used to launch the program, and that symlink's
+  /// base name was 
diff erent from the resolved executable file's name in
+  /// the NT_FILE entry.
+  if (m_nt_file_entries.empty())
+    return std::nullopt;
+  // The AUX vector has the load address of the program headers from the main
+  // executable as the value for AUXV_AT_PHDR. We can use this value to find
+  // the NT_FILE entry that contains this address and this will locate the main
+  // executable's mapping that contains the ELF header.
+  AuxVector aux_vector(m_auxv);
+  if (std::optional<uint64_t> opt_value =
+          aux_vector.GetAuxValue(AuxVector::AUXV_AT_PHDR)) {
+    if (std::optional<NT_FILE_Entry> nt =
+            GetNTFileEntryContainingAddress(*opt_value))
+      return *nt;
+  }
+  // Fall back to trying to find the first NT_FILE entry that contains the entry
+  // point address.
+  if (std::optional<uint64_t> opt_value =
+          aux_vector.GetAuxValue(AuxVector::AUXV_AT_ENTRY)) {
+    if (std::optional<NT_FILE_Entry> nt =
+            GetNTFileEntryContainingAddress(*opt_value))
+      return *nt;
+  }
+  return std::nullopt;
+}

diff  --git a/lldb/source/Plugins/Process/elf-core/ProcessElfCore.h b/lldb/source/Plugins/Process/elf-core/ProcessElfCore.h
index 2b6b34075252f..e6f1fa0027554 100644
--- a/lldb/source/Plugins/Process/elf-core/ProcessElfCore.h
+++ b/lldb/source/Plugins/Process/elf-core/ProcessElfCore.h
@@ -172,8 +172,8 @@ class ProcessElfCore : public lldb_private::PostMortemProcess {
 
   lldb_private::UUID FindModuleUUID(const llvm::StringRef path) override;
 
-  // Returns the main executable path.
-  std::string GetMainExecutablePath();
+  // Extract the executable module spec for the executable in this core file.
+  bool GetMainExecutableModuleSpec(lldb_private::ModuleSpec &exe_spec);
 
   // Returns the value of certain type of note of a given start address
   lldb_private::UUID FindBuidIdInCoreMemory(lldb::addr_t address);
@@ -192,6 +192,12 @@ class ProcessElfCore : public lldb_private::PostMortemProcess {
   llvm::Error parseNetBSDNotes(llvm::ArrayRef<lldb_private::CoreNote> notes);
   llvm::Error parseOpenBSDNotes(llvm::ArrayRef<lldb_private::CoreNote> notes);
   llvm::Error parseLinuxNotes(llvm::ArrayRef<lldb_private::CoreNote> notes);
+
+  /// Find the NT_FILE entry that contains an address.
+  std::optional<NT_FILE_Entry>
+  GetNTFileEntryContainingAddress(lldb::addr_t addr);
+  /// Intelligently find the NT_FILE entry for the executable's ELF header.
+  std::optional<NT_FILE_Entry> GetNTFileEntryForExecutableELFHeader();
 };
 
 #endif // LLDB_SOURCE_PLUGINS_PROCESS_ELF_CORE_PROCESSELFCORE_H

diff  --git a/lldb/test/API/functionalities/postmortem/elf-core/TestLinuxCore.py b/lldb/test/API/functionalities/postmortem/elf-core/TestLinuxCore.py
index 959339c2c6ca0..da7f0ca7f9e71 100644
--- a/lldb/test/API/functionalities/postmortem/elf-core/TestLinuxCore.py
+++ b/lldb/test/API/functionalities/postmortem/elf-core/TestLinuxCore.py
@@ -1101,7 +1101,7 @@ def test_linux_no_exe(self):
         libraries are available. The "image list" output should look like:
 
         (lldb) image list
-        [  0] 7BCC1101 0x000055bb04288000 /data/users/gclayton/args/elf-crash (0x000055bb04288000)
+        [  0] 9FD61477 0x000055bb04288000 /data/users/gclayton/args/elf-crash (0x000055bb04288000)
         [  1]                                      0x00007f27db200000 /libxx/libstdc++.so.6
         [  2] AF275675-4671-8B49-24C8-A9A657D74115-C80DEE65 0x00007f27db51b000 /libxx/libm.so.6 (0x00007f27db51b000)
         [  3]                                      0x00007f27db4fe000 /libxx/libgcc_s.so.1
@@ -1119,7 +1119,7 @@ def test_linux_no_exe(self):
         self.assertEqual(
             m.GetObjectFileHeaderAddress().GetLoadAddress(target), 0x000055BB04288000
         )
-        self.assertEqual(m.GetUUIDString(), "7BCC1101")
+        self.assertEqual(m.GetUUIDString(), "9FD61477")
 
         m = target.module["/libxx/libstdc++.so.6"]
         self.assertTrue(m.IsValid())
@@ -1284,6 +1284,55 @@ def do_test(self, filename, pid, region_count, thread_name):
 
         self.dbg.DeleteTarget(target)
 
+    def test_exe_name_extraction_nt_file(self):
+        # This core file has:
+        # - NT_FILE entry for the executable with path '/path/nt_file_foo
+        # - AT_EXECFN that points to "/path/execfn_foo"
+        # - NT_PRPSINFO with a pr_fname member set to 'prpsinfo_foo'
+        # We expect the NT_FILE version to be found since this is a resolved
+        # file path and it is the best information we can use for the executable
+        # name.
+        yaml_path = self.getSourcePath("elf-NT_FILE-NT_PRPSINFO-AT_EXECFN.yaml")
+        core_path = self.getBuildArtifact("elf-NT_FILE-NT_PRPSINFO-AT_EXECFN.core")
+        self.yaml2obj(yaml_path, core_path)
+        target = self.dbg.CreateTarget(None)
+        process = target.LoadCore(core_path)
+        exe_module = target.modules[0]
+        self.assertEqual(exe_module.GetFileSpec().fullpath, "/path/nt_file_foo")
+        self.dbg.DeleteTarget(target)
+
+    def test_exe_name_extraction_at_execfn(self):
+        # This core file has:
+        # - AT_EXECFN that points to "/path/execfn_foo"
+        # - NT_PRPSINFO with a pr_fname member set to 'prpsinfo_foo'
+        # There is no NT_FILE in this core file, so we expect the fall back to
+        # the AT_EXECFN name in memory as it has a full path to the executable.
+        # This path can 
diff er from the path found in NT_FILE as it might not
+        # be resolved as it can be a symlink path.
+        yaml_path = self.getSourcePath("elf-NT_PRPSINFO-AT_EXECFN.yaml")
+        core_path = self.getBuildArtifact("elf-NT_PRPSINFO-AT_EXECFN.core")
+        self.yaml2obj(yaml_path, core_path)
+        target = self.dbg.CreateTarget(None)
+        process = target.LoadCore(core_path)
+        exe_module = target.modules[0]
+        self.assertEqual(exe_module.GetFileSpec().fullpath, "/path/execfn_foo")
+        self.dbg.DeleteTarget(target)
+
+    def test_exe_name_extraction_nt_prpsinfo(self):
+        # This core file has:
+        # - NT_PRPSINFO with a pr_fname member set to 'prpsinfo_foo'
+        # There is no NT_FILE or AT_EXECFN in the aux vector in this core file.
+        # We expect the fall back to the info in the NT_PRPSINFO note.
+        yaml_path = self.getSourcePath("elf-NT_PRPSINFO.yaml")
+        core_path = self.getBuildArtifact("elf-NT_PRPSINFO.core")
+        self.yaml2obj(yaml_path, core_path)
+        target = self.dbg.CreateTarget(None)
+        process = target.LoadCore(core_path)
+        exe_module = target.modules[0]
+        self.assertEqual(exe_module.GetFileSpec().fullpath, "prpsinfo_foo")
+        self.dbg.DeleteTarget(target)
+
+
 
 def replace_path(binary, replace_from, replace_to):
     src = replace_from.encode()

diff  --git a/lldb/test/API/functionalities/postmortem/elf-core/elf-NT_FILE-NT_PRPSINFO-AT_EXECFN.yaml b/lldb/test/API/functionalities/postmortem/elf-core/elf-NT_FILE-NT_PRPSINFO-AT_EXECFN.yaml
new file mode 100644
index 0000000000000..5bc949ade451f
--- /dev/null
+++ b/lldb/test/API/functionalities/postmortem/elf-core/elf-NT_FILE-NT_PRPSINFO-AT_EXECFN.yaml
@@ -0,0 +1,29 @@
+--- !ELF
+FileHeader:
+  Class:           ELFCLASS64
+  Data:            ELFDATA2LSB
+  Type:            ET_CORE
+  Machine:         EM_X86_64
+ProgramHeaders:
+  - Type:            PT_NOTE
+    Align:           0x4
+    FileSize:        0x2c4
+    Offset:          0xb0
+  - Type:            PT_LOAD
+    Flags:           [ PF_R ]
+    VAddr:           0x10000
+    Align:           0x4
+    FileSize:        0x11
+    MemSize:         0x1f
+    Offset:          0x374
+Sections:
+  - Type:            Fill
+    Pattern:         0600000030000000060000004c494e5558000000030000000000000040802804bb5500001f00000000000000000001000000000000000000000000000000000000000000050000005001000001000000434f5245000000000b00000000000000000000000b000000000000000000000000000000000000004a4433005f7220004a4433005f7220000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e063db277f0000b8bd2804bb55000030912804bb550000f8191ec0ff7f0000e0181ec0ff7f00000000000000000000a0acffda277f0000e90000000000000060c060db277f000050c4ffda277f000000000000000000000100000000000000081a1ec0ff7f0000f8191ec0ff7f00000100000000000000ffffffffffffffff4e912804bb55000033000000000000004602010000000000e0181ec0ff7f00002b0000000000000040974fdb277f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000050000006a000000454c4946434f5245000000000200000000000000001000000000000000802804bb55000000902804bb55000000000000000000000000e07e147f000000c0e27e147f000020000000000000002f706174682f6e745f66696c655f666f6f002f706174682f6e745f66696c652f6c6962632e736f2e36000000050000008800000003000000434f524500000000024400000000000008044040000000003000000030000000510d0000360d0000d9040000d904000070727073696e666f5f666f6f000000002f706174682f70727073696e666f5f666f6f202d2d766572626f736500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+    Size:            0x2c4
+    Offset:          0xb0
+  - Type:            Fill
+    Pattern:         2f706174682f65786563666e5f666f6f00
+    Size:            0x11
+    Offset:          0x374
+  - Type:            SectionHeaderTable
+    NoHeaders:       true

diff  --git a/lldb/test/API/functionalities/postmortem/elf-core/elf-NT_PRPSINFO-AT_EXECFN.yaml b/lldb/test/API/functionalities/postmortem/elf-core/elf-NT_PRPSINFO-AT_EXECFN.yaml
new file mode 100644
index 0000000000000..c6834dd7dda8f
--- /dev/null
+++ b/lldb/test/API/functionalities/postmortem/elf-core/elf-NT_PRPSINFO-AT_EXECFN.yaml
@@ -0,0 +1,29 @@
+--- !ELF
+FileHeader:
+  Class:           ELFCLASS64
+  Data:            ELFDATA2LSB
+  Type:            ET_CORE
+  Machine:         EM_X86_64
+ProgramHeaders:
+  - Type:            PT_NOTE
+    Align:           0x4
+    FileSize:        0x234
+    Offset:          0xb0
+  - Type:            PT_LOAD
+    Flags:           [ PF_R ]
+    VAddr:           0x10000
+    Align:           0x4
+    FileSize:        0x11
+    MemSize:         0x1f
+    Offset:          0x2e4
+Sections:
+  - Type:            Fill
+    Pattern:         0600000020000000060000004c494e55580000001f00000000000000000001000000000000000000000000000000000000000000050000005001000001000000434f5245000000000b00000000000000000000000b000000000000000000000000000000000000004a4433005f7220004a4433005f7220000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e063db277f0000b8bd2804bb55000030912804bb550000f8191ec0ff7f0000e0181ec0ff7f00000000000000000000a0acffda277f0000e90000000000000060c060db277f000050c4ffda277f000000000000000000000100000000000000081a1ec0ff7f0000f8191ec0ff7f00000100000000000000ffffffffffffffff4e912804bb55000033000000000000004602010000000000e0181ec0ff7f00002b0000000000000040974fdb277f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000050000008800000003000000434f524500000000024400000000000008044040000000003000000030000000510d0000360d0000d9040000d904000070727073696e666f5f666f6f000000002f706174682f70727073696e666f5f666f6f202d2d766572626f736500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+    Size:            0x234
+    Offset:          0xb0
+  - Type:            Fill
+    Pattern:         2f706174682f65786563666e5f666f6f00
+    Size:            0x11
+    Offset:          0x2e4
+  - Type:            SectionHeaderTable
+    NoHeaders:       true

diff  --git a/lldb/test/API/functionalities/postmortem/elf-core/elf-NT_PRPSINFO.yaml b/lldb/test/API/functionalities/postmortem/elf-core/elf-NT_PRPSINFO.yaml
new file mode 100644
index 0000000000000..99b5c5dde0903
--- /dev/null
+++ b/lldb/test/API/functionalities/postmortem/elf-core/elf-NT_PRPSINFO.yaml
@@ -0,0 +1,18 @@
+--- !ELF
+FileHeader:
+  Class:           ELFCLASS64
+  Data:            ELFDATA2LSB
+  Type:            ET_CORE
+  Machine:         EM_X86_64
+ProgramHeaders:
+  - Type:            PT_NOTE
+    Align:           0x4
+    FileSize:        0x224
+    Offset:          0x78
+Sections:
+  - Type:            Fill
+    Pattern:         0600000010000000060000004c494e555800000000000000000000000000000000000000050000005001000001000000434f5245000000000b00000000000000000000000b000000000000000000000000000000000000004a4433005f7220004a4433005f7220000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e063db277f0000b8bd2804bb55000030912804bb550000f8191ec0ff7f0000e0181ec0ff7f00000000000000000000a0acffda277f0000e90000000000000060c060db277f000050c4ffda277f000000000000000000000100000000000000081a1ec0ff7f0000f8191ec0ff7f00000100000000000000ffffffffffffffff4e912804bb55000033000000000000004602010000000000e0181ec0ff7f00002b0000000000000040974fdb277f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000050000008800000003000000434f524500000000024400000000000008044040000000003000000030000000510d0000360d0000d9040000d904000070727073696e666f5f666f6f000000002f706174682f70727073696e666f5f666f6f202d2d766572626f736500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+    Size:            0x224
+    Offset:          0x78
+  - Type:            SectionHeaderTable
+    NoHeaders:       true


        


More information about the lldb-commits mailing list