This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFC: DW_OP_call_frame_cfa, again


On Tue, Aug 11, 2009 at 02:49:02PM -0600, Tom Tromey wrote:
> This version implements Daniel's idea of checking the frame unwinder.
> If you read the followup message (above) you'll see that this patch is
> different from what I talked about there; that approach doesn't work
> since the DWARF frame base sniffer is not registered for many
> architectures.  Jan suggested the current approach.

Am I correct that this works only if all unwinders for this
architecture use the same CFA notion that DWARF-2 would?  If so -
probably already a requirement - it deserves a comment.

> One further issue is that this interacts poorly with the i386 epilogue
> unwinder.  I punted on this issue for the time being.  However, with GCC
> 4.5, I think the DWARF unwinder is supposed to work fine for epilogues
> -- so can we make the epilogue unwinder conditional?  Is this special
> unwinder only needed for reverse execution?  If so, could we make it
> conditional on when that mode is enabled?

It's useful at other times.  My canonical torture test for this is a
software watchpoint on a local variable, and then "next" over the
application's first call to printf - with glibc debug info.  You'll go
through the PLT, ld.so, printf itself, nested functions, et cetera.
Without an epilogue unwinder the only reason this survives is an
in_epilogue_p or similar hack in the watchpoint checking code.

With GCC 4.5 the DWARF unwinder ought to work fine for epilogues on
specific platforms, not all.

On Tue, Sep 01, 2009 at 12:08:25PM -0600, Tom Tromey wrote:
> >>>>> "Tom" == Tom Tromey <tromey@redhat.com> writes:
> 
> Tom> Here is a new version of my patch to implement DW_OP_call_frame_cfa.
> Tom> Previous thread here:
> Tom>     http://sourceware.org/ml/gdb-patches/2009-06/msg00191.html
> Tom> With followup the next month (I wish our mailing list archive handled
> Tom> this more nicely):
> Tom>     http://sourceware.org/ml/gdb-patches/2009-07/msg00570.html
> 
> Here is an updated version.  This fixes a couple of bugs found by
> testing it in Fedora rawhide.
> 
> I'm happy with this version, so I plan to check it in next week or so.
> Comment soon if you think it needs some change.

Aside from above, this version seems fine.

-- 
Daniel Jacobowitz
CodeSourcery


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]