[lldb-dev] lldb test failures on 32bit

Michael Sartain mikesart at gmail.com
Tue Aug 13 18:22:19 PDT 2013


For the "n" statement not stepping over a i386 hello_world app, it looks
like we don't have unwind info for the printf plt.

They do exist in the binary:

> mikesart at mikesart-rad:~/data/src/blah/build32$ readelf
--debug-dump=frames --wide hello_world
> Contents of the .eh_frame section:
>
> 00000000 00000014 00000000 CIE
>   Version:               1
>   Augmentation:          "zR"
>   Code alignment factor: 1
>   Data alignment factor: -4
>   Return address column: 8
>   Augmentation data:     1b
>
>   DW_CFA_def_cfa: r4 (esp) ofs 4
>   DW_CFA_offset: r8 (eip) at cfa-4
>   DW_CFA_nop
>   DW_CFA_nop
>
> 00000018 00000020 0000001c FDE cie=00000000 pc=080484a0..080484e0
>   DW_CFA_def_cfa_offset: 8
>   DW_CFA_advance_loc: 6 to 080484a6
>   DW_CFA_def_cfa_offset: 12
>   DW_CFA_advance_loc: 10 to 080484b0
>   DW_CFA_def_cfa_expression (DW_OP_breg4 (esp): 4; DW_OP_breg8 (eip): 0;
DW_OP_lit15; DW_OP_and; DW_OP_lit11; DW_OP_ge; DW_OP_lit2; DW_OP_shl;
DW_OP_plus)

But lldb either can't find them or they've failed to load.

> Process 4045 stopped
> * thread #1: tid = 4045, 0x080484d0 hello_world, name = 'hello_world',
stop reason = instruction step into
>     frame #0: 0x080484d0 hello_world
> -> 0x80484d0:  jmp    dword ptr [0x804a008]
>    0x80484d6:  push   0x10
>    0x80484db:  jmp    0x80484a0                 ; hello_world..plt + 0
> hello_world`_start + 64:
>    0x80484e0:  xor    ebp, ebp
>
> (lldb) target modules show-unwind -a 0x80484d0
> (lldb)

Unwind info does exist for addresses in main(), and all of this works as
expected in x64.

I'll start debugging where this is failing...
 -Mike
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20130813/cd3c87cc/attachment.html>


More information about the lldb-dev mailing list