This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: [testsuite & dwarf2] How to handle store.exp failure on AMD64?
On Tue, Aug 12, 2003 at 11:54:32PM -0400, Andrew Cagney wrote:
I would have expected the CIE.INITIAL_INSTRUCTIONS to specify the
default state of all DWARF2 registers, and not just a select few.
Folks already complain unwind info is too large.
Sounds like a furphy, the difference really is in the noise.
As I said, GCC's unwinder assumes DW_CFA_same_value unless otherwise
stated. Since scratch registers aren't live across the call, it
doesn't matter that we don't mark registers DW_CFA_undefined; any
(accurate) debug information you'll find at the call site in the
caller simply won't say that values are live in those registers.
Anything else would be a bug.
So assuming DW_CFA_same_value produces the most compact representation.
Hmm, an important detail I should have re-iterated (Daniel's original
post mentioned it but it appears to been lost in that exchange). The
unwind info is in two parts:
CIE: This is a global structure shared between many many FDEs
FDE: This is the thing that describes an unwind table.
The initial status of each register is drawn from the CIE, and not the
FDE. In the case of the example in question (store.c) there are 3 CIEs
(I halved everthing as .eh_frame makes the info appear twice) and 30
FDEs. Breaking it down: 1 CIE appears to have 0 references; 1 has 1
reference; and 1 (the only real one) has the remaining 29 references.
At worst GCC would need to add the information to 3 CIEs, at best 1.
If GCC is going to move forward with optimizations that involve local
functions not complying to the ABI, it will need to supply complete
INITIAL_INSTRUCTIONS information. Might as well fix this bug and start
doing it now.
Andrew