[PATCH] D65832: [llvm-readelf] Implement NT_FILE core file parsing

Jordan Rupprecht via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 6 15:39:52 PDT 2019


rupprecht created this revision.
rupprecht added reviewers: MaskRay, jhenderson, grimar.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Core files can have NT_FILE note types that contain mappings for files, e.g.

  CORE                  0x00000080      NT_FILE (mapped files)
    Page size: 4096
                 Start                 End         Page Offset
    0x0000000000001000  0x0000000000002000  0x0000000000003000
        /path/to/a.out
    0x0000000000004000  0x0000000000005000  0x0000000000006000
        /path/to/libc.so
    0x0000000000007000  0x0000000000008000  0x0000000000009000
        [stack]

(A more realistic example can be tested locally by creating a crashing program and running `llvm-readelf -n core`)

This implements an identical GNU readelf style output as well as a corresponding LLVM style output for NT_FILE notes.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D65832

Files:
  llvm/test/tools/llvm-readobj/note-core-ntfile-bad.test
  llvm/test/tools/llvm-readobj/note-core-ntfile.test
  llvm/tools/llvm-readobj/ELFDumper.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D65832.213737.patch
Type: text/x-patch
Size: 14570 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190806/418b9539/attachment-0001.bin>


More information about the llvm-commits mailing list