Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* dwarf2-frame vs set_loc
@ 2006-09-28 22:42 Daniel Jacobowitz
  2006-09-29 19:33 ` Joel Brobecker
  0 siblings, 1 reply; 6+ messages in thread
From: Daniel Jacobowitz @ 2006-09-28 22:42 UTC (permalink / raw)
  To: gdb, Mark Kettenis

Hi Mark,

I can't work out a way to fix this in the time I've got this evening,
so I just wanted to record it, and send a copy your way in case you're
interested in fixing it; you're more familiar with dwarf2-frame.c and
the formats it handles than I am.

GCC was temporarily changed to use DW_CFA_set_loc at the start of FDEs.
I believe that change has now been backed out again; it was wrong (and
partly my fault).  But Debian happened to pick up a snapshot containing
that patch and it caused a couple of GDB test failures.  At least one,
anyway, I'm not sure if the other two had the same cause.  This is on
x86_64.

I tracked the problem down to use of dwarf2_read_address.  As far as I
can tell, what we really need is to use read_encoded_value for this.
But, that wants a "struct comp_unit" (misleading name?  It's really not
DW_TAG_compile_unit related at all, it's the whole object).  And we
don't have one any more by the time we're in execute_cfa_program, so
that's where I gave up.

Anyway, there's an 'R' augmentation specifying the encoding, which
happens to use only four bytes for pointers and not the eight that
dwarf2_read_address is expecting, and so we decide the first
instruction of the FDE is way out in the middle of nowhere.  Backtraces
break.

-- 
Daniel Jacobowitz
CodeSourcery


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2006-10-04 13:37 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-09-28 22:42 dwarf2-frame vs set_loc Daniel Jacobowitz
2006-09-29 19:33 ` Joel Brobecker
2006-09-29 19:37   ` Daniel Jacobowitz
2006-09-29 20:09     ` David Daney
2006-10-04  3:14       ` Joel Brobecker
2006-10-04 13:37         ` Daniel Jacobowitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox