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
24 lines
1.3 KiB
Plaintext
24 lines
1.3 KiB
Plaintext
# RUN: yaml2obj %S/Inputs/basic-elf.yaml > %T/symtab.out
|
|
# RUN: %lldb %T/symtab.out -o "target symbols add -s symtab.out %S/Inputs/symtab.syms" \
|
|
# RUN: -s %s | FileCheck %s
|
|
|
|
# CHECK-LABEL: (lldb) image dump symtab symtab.out
|
|
# CHECK: Symtab, file = {{.*}}symtab.out, num_symbols = 3:
|
|
# CHECK: Index UserID DSX Type File Address/Value Load Address Size Flags Name
|
|
# CHECK: [ 0] 0 X Code 0x00000000004000b0 0x0000000000000010 0x00000000 f1
|
|
# CHECK: [ 1] 0 X Code 0x00000000004000c0 0x0000000000000010 0x00000000 f2
|
|
# CHECK: [ 2] 0 X Code 0x00000000004000d0 0x0000000000000022 0x00000000 _start
|
|
|
|
# CHECK-LABEL: (lldb) image lookup -a 0x4000b0 -v
|
|
# CHECK: Address: symtab.out[0x00000000004000b0] (symtab.out.PT_LOAD[0]..text2 + 0)
|
|
# CHECK: Symbol: id = {0x00000000}, range = [0x00000000004000b0-0x00000000004000c0), name="f1"
|
|
|
|
# CHECK-LABEL: (lldb) image lookup -n f2 -v
|
|
# CHECK: Address: symtab.out[0x00000000004000c0] (symtab.out.PT_LOAD[0]..text2 + 16)
|
|
# CHECK: Symbol: id = {0x00000000}, range = [0x00000000004000c0-0x00000000004000d0), name="f2"
|
|
|
|
image dump symtab symtab.out
|
|
image lookup -a 0x4000b0 -v
|
|
image lookup -n f2 -v
|
|
exit
|