2 /* This is really horrible. It checks that the
3 stack unwinder understands DW_CFA_def_cfa_expression. It is
4 the result of compiling this:
27 and bracketing the cmp/jz insns with a move down/up by 256 of %rsp.
28 The .jz causes memcheck to complain, hence unwind the stack, but
29 that cannot be successfully done unless the return address can
30 be found. Hence the handwritten CFI below uses
31 DW_CFA_def_cfa_expression to make that possible.
33 The CFI below isn't really right in that aaa appears twice
36 ==12868== Conditional jump or move depends on uninitialised value(s)
37 ==12868== at 0x400512: bbb (in /home/sewardj/VgTRUNK/trunk/mad0)
38 ==12868== by 0x400520: aaa (in /home/sewardj/VgTRUNK/trunk/mad0)
39 ==12868== by 0x400520: aaa (in /home/sewardj/VgTRUNK/trunk/mad0)
40 ==12868== by 0x400538: main (in /home/sewardj/VgTRUNK/trunk/mad0)
42 but GDB behaves the same, so I'm not too concerned - indicates
43 the problem is with the handwritten CFI and not with
44 V's interpretation of it.
94 .section .eh_frame,"a",@progbits
114 /* start of the FDE for bbb */
116 .long .LEFDE1-.LASFDE1 /* length of FDE */
118 .long .LASFDE1-.Lframe1 /* CIE pointer */
119 .long .LFB2 /* & bbb */
120 .long .LFE2-.LFB2 /* sizeof(bbb) */
121 .uleb128 0 /* augmentation length */
122 .byte 0x40 + .Lbbb2 - .Lbbb1 /* _advance_loc to .Lbbb2 */
124 /* For the section in between .Lbbb2 and .Lbbb3, set the
125 CFA to be %rsp+256, and set the return address (dwarf r16)
127 .byte 0x0f /* _def_cfa_expression */
128 .uleb128 .Lexpr1e-.Lexpr1s /* length of expression */
130 .byte 0x77 /* DW_OP_breg7 == %rsp + sleb128(0) */
132 .byte 0x40 /* DW_OP_lit16 */
133 .byte 0x40 /* DW_OP_lit16 */
134 .byte 0x1e /* DW_OP_mul */
135 .byte 0x22 /* DW_OP_plus */
137 .byte 0x90 /* _cfa_offset: r16 = *(cfa+0) */
140 .byte 0x40 + .Lbbb3 - .Lbbb2 /* _advance_loc to .Lbbb3 */
142 /* For the section .Lbbb3 to .Lbbb4, should set CFA back to
143 something sensible. This tries to do it but still causes
144 GDB to show an extraneous aaa frame on the stack. Oh well. */
145 /* Now set CFA back to %rsp+0 */
146 .byte 0x0f /* _def_cfa_expression */
147 .uleb128 .Lexpr2e-.Lexpr2s /* length of expression */
149 .byte 0x77 /* DW_OP_breg7 == %rsp + sleb128(0) */
151 .byte 0x30 /* DW_OP_lit0 */
152 .byte 0x1c /* DW_OP_minus */
154 .byte 0x90 /* _cfa_offset: r16 = *(cfa+0) */
157 .byte 0x40 + .Lbbb4 - .Lbbb3 /* _advance_loc to .Lbbb4 */
158 .uleb128 0x0 /* ??? */
161 /* end of the FDE for bbb */
164 .long .LEFDE3-.LASFDE3
166 .long .LASFDE3-.Lframe1
173 .long .LEFDE5-.LASFDE5
175 .long .LASFDE5-.Lframe1
185 .ident "GCC: (GNU) 4.1.2 20061115 (prerelease) (SUSE Linux)"
186 .section .note.GNU-stack,"",@progbits