108 lines
5.5 KiB
Plaintext
108 lines
5.5 KiB
Plaintext
# NB: The minidump core file exists only because "image show-unwind" currently
|
|
# requires a process to exist. If that changes, it can be removed.
|
|
|
|
# REQUIRES: x86, lld
|
|
|
|
# RUN: split-file %s %t
|
|
# RUN: yaml2obj %t/a.core.yaml -o %t/a.core
|
|
# RUN: %clang -c --target=x86_64-pc-linux %t/a.s -o %t/a.o
|
|
# RUN: ld.lld --shared %t/a.o -o %t/a.debug --build-id=0xdeadbeef \
|
|
# RUN: --image-base=0x10000
|
|
# RUN: llvm-objcopy --strip-all %t/a.debug %t/a.stripped
|
|
# RUN: cd %t
|
|
# RUN: %lldb -c %t/a.core \
|
|
# RUN: -o "settings set interpreter.stop-command-source-on-error false" \
|
|
# RUN: -s %t/commands -o quit | FileCheck %s
|
|
|
|
#--- commands
|
|
|
|
image add a.stripped
|
|
image load --file a.stripped --slide 0
|
|
image list
|
|
# CHECK-LABEL: image list
|
|
# CHECK: [ 0] DEADBEEF 0x0000000000010000 a.stripped
|
|
|
|
## Due to missing symbol information this (incorrectly) prints the unwind
|
|
## information for public_fn1
|
|
image show-unwind -n public_fn1 --cached true
|
|
# CHECK-LABEL: image show-unwind -n public_fn1
|
|
# CHECK-NEXT: UNWIND PLANS for a.stripped`public_fn1 (start addr 0x12000)
|
|
# CHECK-NOT: debug_frame UnwindPlan:
|
|
|
|
target symbols add -s a.stripped a.debug
|
|
# CHECK-LABEL: target symbols add
|
|
# CHECK: symbol file {{.*}} has been added to {{.*}}
|
|
|
|
image show-unwind -n private_fn --cached true
|
|
# CHECK-LABEL: image show-unwind -n private_fn
|
|
# CHECK-NEXT: UNWIND PLANS for a.stripped`private_fn (start addr 0x12010)
|
|
# CHECK: debug_frame UnwindPlan:
|
|
# CHECK-NEXT: This UnwindPlan originally sourced from DWARF CFI
|
|
# CHECK-NEXT: This UnwindPlan is sourced from the compiler: yes.
|
|
# CHECK-NEXT: This UnwindPlan is valid at all instruction locations: no.
|
|
# CHECK-NEXT: This UnwindPlan is for a trap handler function: no.
|
|
# CHECK-NEXT: Address range of this UnwindPlan: [a.stripped.PT_LOAD[1]..text + 16-19)
|
|
|
|
|
|
#--- a.s
|
|
|
|
.text
|
|
.cfi_sections .debug_frame
|
|
.globl public_fn1, public_fn2
|
|
|
|
.p2align 12
|
|
public_fn1:
|
|
.cfi_startproc
|
|
pushq %rbp
|
|
.cfi_def_cfa_offset 16
|
|
.cfi_offset %rbp, -16
|
|
popq %rbp
|
|
.cfi_def_cfa %rsp, 8
|
|
retq
|
|
.cfi_endproc
|
|
|
|
.p2align 4
|
|
private_fn:
|
|
.cfi_startproc
|
|
pushq %rbp
|
|
.cfi_def_cfa_offset 16
|
|
.cfi_offset %rbp, -16
|
|
popq %rbp
|
|
.cfi_def_cfa %rsp, 8
|
|
retq
|
|
.cfi_endproc
|
|
|
|
.p2align 4
|
|
public_fn2:
|
|
.cfi_startproc
|
|
pushq %rbp
|
|
.cfi_def_cfa_offset 16
|
|
.cfi_offset %rbp, -16
|
|
popq %rbp
|
|
.cfi_def_cfa %rsp, 8
|
|
retq
|
|
.cfi_endproc
|
|
|
|
#--- a.core.yaml
|
|
--- !minidump
|
|
Streams:
|
|
- Type: SystemInfo
|
|
Processor Arch: AMD64
|
|
Platform ID: Linux
|
|
CPU:
|
|
Vendor ID: GenuineIntel
|
|
Version Info: 0x00000000
|
|
Feature Info: 0x00000000
|
|
- Type: ThreadList
|
|
Threads:
|
|
- Thread Id: 0x000074F3
|
|
Context: 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000B001000000000006CAE000000006B7FC05A0000C81D415A0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000A2BF9E5A6B7F0000000000000000000000000000000000008850C14BFD7F00009850C14BFD7F00000100000000000000B04AC14BFD7F0000000000000000000060812D01000000000800000000000000B065E05A6B7F00008004400000000000E050C14BFD7F00000000000000000000000000000000000004400000000000007F03FFFF0000FFFFFFFFFFFF000000000000000000000000801F00006B7F00000400000000000000B84CC14BFD7F0000304D405A6B7F0000C84DC14BFD7F0000C0AA405A6B7F00004F033D0000000000B84DC14BFD7F0000E84DC14BFD7F0000000000000000000000000000000000000070E05A6B7F000078629E5A6B7F0000C81D415A6B7F0000804F9E5A6B7F00000000000001000000E603000001000000E093115A6B7F0000804EC14BFD7F0000584EC14BFD7F000099ADC05A6B7F00000100000000000000AAAAD77D0000000002000000000000000800000000000000B065E05A6B7F0000E6B7C05A6B7F0000010000006B7F0000884DC14BFD7F0000106F7C5A6B7F0000984EC14BFD7F0000488B7C5A6B7F0000C4A71CB90000000001000000000000000800000000000000B065E05A6B7F000048B6C05A6B7F0000702AE25A6B7F0000D84DC14BFD7F000030489E5A6B7F0000E84EC14BFD7F0000E05E9E5A6B7F00000991F0460000000001000000000000000800000000000000B065E05A6B7F000048B6C05A6B7F00000100000000000000284EC14BFD7F00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
|
Stack:
|
|
Start of Memory Range: 0x00007FFD4BC15080
|
|
Content: 30044000000000000000000000000000
|
|
- Type: MemoryList
|
|
Memory Ranges:
|
|
- Start of Memory Range: 0x00007FFD4BC15080
|
|
Content: 30044000000000000000000000000000
|
|
...
|