[all-commits] [llvm/llvm-project] 12df34: [lldb][elf-core] Populate memory region names from...

Chen Li via All-commits all-commits at lists.llvm.org
Wed Aug 5 14:53:53 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 12df34b8469b8095359de8c249cb1b2753fadeea
      https://github.com/llvm/llvm-project/commit/12df34b8469b8095359de8c249cb1b2753fadeea
  Author: Chen Li <thechenli.dev at gmail.com>
  Date:   2026-08-05 (Wed, 05 Aug 2026)

  Changed paths:
    M lldb/source/Plugins/Process/elf-core/ProcessElfCore.cpp
    M lldb/source/Plugins/Process/elf-core/ProcessElfCore.h
    M lldb/test/API/functionalities/postmortem/elf-core/TestLinuxCore.py
    A lldb/test/API/functionalities/postmortem/elf-core/elf-NT_FILE-memory-region.yaml

  Log Message:
  -----------
  [lldb][elf-core] Populate memory region names from NT_FILE (#212666)

## Summary

`ProcessElfCore` already parses `NT_FILE`, but its cached `PT_LOAD`
memory-region entries did not retain their backing filenames.

- cache a complete `MemoryRegionInfo` for each `PT_LOAD` instead of
rebuilding one from a custom permissions/name record on every query
- associate an `NT_FILE` pathname when the `PT_LOAD` and `NT_FILE`
starts match; their ends may differ, while a `PT_LOAD` beginning inside
an `NT_FILE` range remains unnamed
- finalize names and memory-tag state after all program headers are
parsed, making the result independent of `PT_LOAD` and `PT_NOTE`
ordering
- preserve regions with `p_filesz == 0` and return the cached region
directly from `DoGetMemoryRegionInfo`
- add API coverage for the same-start/different-end case, an interior
unnamed region, and an unnamed NT_FILE-only tail

## Testing

- Clean LLVM 24/LLDB build completed successfully.
- `check-lldb-api-functionalities-postmortem-elf-core` (4/4 passed)
- `ProcessElfCoreTests` (3/3 passed)
- `check-lldb-api-linux-aarch64-mte_core_file` (1/1 passed)
- Real IPNext core compatibility smoke test using an assertion-disabled
Release build:

```
(lldb) memory region 0x7fc4f25fd000
[0x00007fc4f25fd000-0x00007fc4f2600000) r-- /tmp/aot_inductor_loaded_modelaCZzUI/ckq4hskzrtwkbxruge7ofytm2zmahqgcizkszojgcp3eepdubxc2.hsaco
```

The focused API fixture exercises the mismatched-end and interior-start
policies; the production core verifies compatibility with a large
zero-file-size HSACO mapping.

Co-authored-by: Chen Li <chenlii at fb.com>



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list