59 lines · plain
1# Test handing of the dwarf val_offset() rule which can be used to reconstruct2# the value of a register that is neither in a live register or saved on the3# stack but is computable with CFA + offset.4 5# UNSUPPORTED: system-windows, ld_new-bug6# REQUIRES: target-x86_64, native7 8# RUN: %clang_host %p/Inputs/call-asm.c %p/Inputs/eh-frame-dwarf-unwind-val-offset.s -o %t9# RUN: %lldb %t -s %s -o exit | FileCheck %s10 11breakpoint set -n asm_main12# CHECK: Breakpoint 1: where = {{.*}}`asm_main13 14breakpoint set -n bar15# CHECK: Breakpoint 2: where = {{.*}}`bar16 17process launch18# CHECK: stop reason = breakpoint 1.119 20stepi21stepi22stepi23register read -G x r1224# CHECK: r12 = 0x[[#%.16x,R12:]]{{$}}25 26continue27# CHECK: stop reason = breakpoint 2.128 29thread backtrace30# CHECK: frame #0: {{.*}}`bar31# CHECK: frame #1: {{.*}}`foo + 1232# CHECK: frame #2: {{.*}}`asm_main + 2933 34target modules show-unwind -n bar35# CHECK: eh_frame UnwindPlan:36# CHECK: row[0]: 0: CFA=rsp +8 => rip=[CFA-8]37 38target modules show-unwind -n foo39# CHECK: eh_frame UnwindPlan:40# CHECK: row[0]: 0: CFA=rsp +8 => r12=CFA+32 rip=DW_OP_lit8, DW_OP_minus, DW_OP_deref, DW_OP_const1u 0x47, DW_OP_minus41 42target modules show-unwind -n asm_main43# CHECK: eh_frame UnwindPlan:44# CHECK: row[0]: 0: CFA=rsp +8 => rip=[CFA-8]45# CHECK: row[1]: 1: CFA=rsp+16 => rbp=[CFA-16] rip=[CFA-8]46# CHECK: row[2]: 11: CFA=rbp+16 => rbp=[CFA-16] rip=[CFA-8]47# CHECK: row[3]: 30: CFA=rsp +8 => rbp=[CFA-16] rip=[CFA-8]48 49register read -G x r1250# CHECK: r12 = 0x000000000000045651 52frame select 153register read -G x r1254# CHECK: r12 = 0x000000000000045655 56frame select 257register read -G x r1258# CHECK: r12 = 0x[[#R12 + 32]]59