Hello! I noticed the following on ARM, GCC trunk -- didn't check yet whether it is ARM-specific; may be a general issue.
Hacking out the forcing-off of emitting CFI statements in arm.c, I see
the following function prologue emitted (-O -g):
.text
.Ltext0:
.cfi_sections .debug_frame
.align 2
.global foo
.type foo, %function
foo:
.LFB0:
.file 1 "c.c"
.loc 1 2 0
.cfi_startproc
@ args = 0, pretend = 0, frame = 0
@ frame_needed = 0, uses_anonymous_args = 0
stmfd sp!, {r3, lr}
.LCFI0:
.cfi_def_cfa_offset 8
.loc 1 4 0
mov r0, #33
.cfi_offset 14, -4
.cfi_offset 3, -8
bl bar
[...]
Comparing this to -pg:
.LCFI0:
.cfi_def_cfa_offset 8
+ push {lr}
+ bl __gnu_mcount_nc
.loc 1 4 0
mov r0, #33
Shouldn't ``.cfi_adjust_cfa_offset 4'' or equivalent be emitted, too? If
I'm interpreting the .debug_frame correctly that is generated directly by
GCC without using CFI statemnts, it seems to have the same problem. Or
am I misunderstanding something?
Regards,
Thomas
pgpWLzqvauAqW.pgp
Description: PGP signature
