xref: /llvm-project/lldb/test/Shell/SymbolFile/Breakpad/symtab-macho.test (revision b587ca93be114d07ec3bf654add97d7872325281)
1# RUN: yaml2obj %S/Inputs/basic-macho.yaml -o %T/symtab-macho.out
2# RUN: %lldb %T/symtab-macho.out -o "target symbols add %S/Inputs/symtab-macho.syms" \
3# RUN:   -s %s | FileCheck %s
4
5image dump symtab symtab-macho.out
6# CHECK-LABEL: (lldb) image dump symtab symtab-macho.out
7# CHECK: Symtab, file = {{.*}}symtab-macho.out, num_symbols = 1:
8# CHECK: Index   UserID DSX Type            File Address/Value Load Address       Size               Flags      Name
9# CHECK: [    0]      0   X Code            0x0000000100000ff0                    0x0000000000000006 0x00000000 _start
10
11# CHECK-LABEL: (lldb) image lookup -a 0x100000ff0 -v
12# CHECK: Address: symtab-macho.out[0x0000000100000ff0] (symtab-macho.out.__TEXT.__text + 0)
13# CHECK: Symbol: id = {0x00000000}, range = [0x0000000100000ff0-0x0000000100000ff6), name="_start"
14
15# CHECK-LABEL: (lldb) image lookup -n _start -v
16# CHECK: Address: symtab-macho.out[0x0000000100000ff0] (symtab-macho.out.__TEXT.__text + 0)
17# CHECK: Symbol: id = {0x00000000}, range = [0x0000000100000ff0-0x0000000100000ff6), name="_start"
18
19image lookup -a 0x100000ff0 -v
20image lookup -n _start -v
21exit
22