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

* Re: dwarf2-frame vs set_loc
  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
  0 siblings, 1 reply; 6+ messages in thread
From: Joel Brobecker @ 2006-09-29 19:33 UTC (permalink / raw)
  To: gdb, Mark Kettenis

> 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.

It is something we also saw in GCC 4.1 and was planning on looking at
this issue for ourselves too sometimes this afternoon or maybe monday
(provided I don't have any other schedule change again). Interestingly,
I stopped at the same place you did...

Let me see if I can have a look within the next few days. Let me know
if you have time earlier to look into this, so that we don't duplicate
efforts.

What's the status at the compiler level, by the way? Still backed out?
If this is the case, I might have to work a bit harder to still be able
to reproduce the problem, because the compiler I have access to is
rebuilt nightly. I should have made a copy of the compiler :-/.

-- 
Joel


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

* Re: dwarf2-frame vs set_loc
  2006-09-29 19:33 ` Joel Brobecker
@ 2006-09-29 19:37   ` Daniel Jacobowitz
  2006-09-29 20:09     ` David Daney
  0 siblings, 1 reply; 6+ messages in thread
From: Daniel Jacobowitz @ 2006-09-29 19:37 UTC (permalink / raw)
  To: gdb

On Fri, Sep 29, 2006 at 12:33:44PM -0700, Joel Brobecker wrote:
> What's the status at the compiler level, by the way? Still backed out?
> If this is the case, I might have to work a bit harder to still be able
> to reproduce the problem, because the compiler I have access to is
> rebuilt nightly. I should have made a copy of the compiler :-/.

Still backed out; presumably going to stay that way, since Jakub made
some entirely correct points about why this is a bad idea.

-- 
Daniel Jacobowitz
CodeSourcery


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

* Re: dwarf2-frame vs set_loc
  2006-09-29 19:37   ` Daniel Jacobowitz
@ 2006-09-29 20:09     ` David Daney
  2006-10-04  3:14       ` Joel Brobecker
  0 siblings, 1 reply; 6+ messages in thread
From: David Daney @ 2006-09-29 20:09 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: gdb

Daniel Jacobowitz wrote:
> On Fri, Sep 29, 2006 at 12:33:44PM -0700, Joel Brobecker wrote:
> 
>>What's the status at the compiler level, by the way? Still backed out?
>>If this is the case, I might have to work a bit harder to still be able
>>to reproduce the problem, because the compiler I have access to is
>>rebuilt nightly. I should have made a copy of the compiler :-/.
> 
> 
> Still backed out; presumably going to stay that way, since Jakub made
> some entirely correct points about why this is a bad idea.
> 

That is not quite accurate.  The original patch (r 116604) is still in 
place.  An additional patch (r 117114) was applied to correct most of 
the problems with the original patch.

David Daney.



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

* Re: dwarf2-frame vs set_loc
  2006-09-29 20:09     ` David Daney
@ 2006-10-04  3:14       ` Joel Brobecker
  2006-10-04 13:37         ` Daniel Jacobowitz
  0 siblings, 1 reply; 6+ messages in thread
From: Joel Brobecker @ 2006-10-04  3:14 UTC (permalink / raw)
  To: gdb

Hi Daniel,

Does it still make sense to look at this? I no longer have access
to a compiler that produces this behavior in the debugger...

-- 
Joel


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

* Re: dwarf2-frame vs set_loc
  2006-10-04  3:14       ` Joel Brobecker
@ 2006-10-04 13:37         ` Daniel Jacobowitz
  0 siblings, 0 replies; 6+ messages in thread
From: Daniel Jacobowitz @ 2006-10-04 13:37 UTC (permalink / raw)
  To: gdb

On Tue, Oct 03, 2006 at 08:14:04PM -0700, Joel Brobecker wrote:
> Hi Daniel,
> 
> Does it still make sense to look at this? I no longer have access
> to a compiler that produces this behavior in the debugger...

Eventually, I think, but not with any urgency.

-- 
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