diff options
| author | Pavel Labath <pavel@labath.sk> | 2019-01-11 11:17:51 +0000 |
|---|---|---|
| committer | Pavel Labath <pavel@labath.sk> | 2019-01-11 11:17:51 +0000 |
| commit | 1cf23e1a37a07639508b63db22b9abc7d1e5f600 (patch) | |
| tree | 9e7306b5fa02ae27d22f970c4fc4d9eb451bf40c /lldb/lit/SymbolFile/Breakpad/Inputs | |
| parent | 43ddbc0b6c089185eafa3ebd92de2b1120577ac4 (diff) | |
| download | bcm5719-llvm-1cf23e1a37a07639508b63db22b9abc7d1e5f600.tar.gz bcm5719-llvm-1cf23e1a37a07639508b63db22b9abc7d1e5f600.zip | |
Introduce SymbolFileBreakpad and use it to fill symtab
Summary:
This commit adds the glue code necessary to integrate the
SymbolFileBreakpad into the plugin system. Most of the methods are
stubbed out. The only method implemented method is AddSymbols, which
parses the PUBLIC "section" of the breakpad "object file", and fills out
the Module's symtab.
To enable testing this, I've made two additional changes:
- dump Symtab from the SymbolVendor class. The symtab was already being
dumped as a part of the object file dump, but that happened before
symbol vendor kicked in, so it did not reflect any symbols added
there.
- add ability to explicitly specify the external symbol file in
lldb-test (so that the object file could be linked with the breakpad
symbol file). To make things simpler, I've changed lldb-test from
consuming multiple inputs (and dumping their symbols) to having it
just process a single file per invocation. This was not a problem
since everyone was using it that way already.
Reviewers: clayborg, zturner, lemo, markmentovai, amccarth
Subscribers: mgorny, lldb-commits
Differential Revision: https://reviews.llvm.org/D56173
llvm-svn: 350924
Diffstat (limited to 'lldb/lit/SymbolFile/Breakpad/Inputs')
| -rw-r--r-- | lldb/lit/SymbolFile/Breakpad/Inputs/basic-elf.yaml | 33 | ||||
| -rw-r--r-- | lldb/lit/SymbolFile/Breakpad/Inputs/symtab.syms | 7 |
2 files changed, 40 insertions, 0 deletions
diff --git a/lldb/lit/SymbolFile/Breakpad/Inputs/basic-elf.yaml b/lldb/lit/SymbolFile/Breakpad/Inputs/basic-elf.yaml new file mode 100644 index 00000000000..4d6a1e15b60 --- /dev/null +++ b/lldb/lit/SymbolFile/Breakpad/Inputs/basic-elf.yaml @@ -0,0 +1,33 @@ +# A very basic ELF file to serve as a recipient of breakpad info + +--- !ELF +FileHeader: + Class: ELFCLASS64 + Data: ELFDATA2LSB + Type: ET_EXEC + Machine: EM_X86_64 + Entry: 0x00000000004000D0 +Sections: + - Name: .text1 + Type: SHT_PROGBITS + Flags: [ SHF_ALLOC, SHF_EXECINSTR ] + Address: 0x0000000000400000 + AddressAlign: 0x0000000000001000 + Size: 0xb0 + - Name: .text2 + Type: SHT_PROGBITS + Flags: [ SHF_ALLOC, SHF_EXECINSTR ] + Address: 0x00000000004000B0 + AddressAlign: 0x0000000000000010 + Size: 0x42 +Symbols: +DynamicSymbols: +ProgramHeaders: + - Type: PT_LOAD + Flags: [ PF_X, PF_R ] + VAddr: 0x400000 + Align: 0x1000 + Sections: + - Section: .text1 + - Section: .text2 +... diff --git a/lldb/lit/SymbolFile/Breakpad/Inputs/symtab.syms b/lldb/lit/SymbolFile/Breakpad/Inputs/symtab.syms new file mode 100644 index 00000000000..ab03b50a75a --- /dev/null +++ b/lldb/lit/SymbolFile/Breakpad/Inputs/symtab.syms @@ -0,0 +1,7 @@ +MODULE Linux x86_64 761550E08086333960A9074A9CE2895C0 a.out +INFO CODE_ID E05015768680393360A9074A9CE2895C +FILE 0 /tmp/a.c +PUBLIC b0 0 f1 +PUBLIC m c0 0 f2 +PUBLIC d0 0 _start +PUBLIC ff 0 _out_of_range_ignored |

