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: [SH][PATCH] Disable ABI frame sniffer


On Thu, Nov 10, 2005 at 10:33:18AM +0000, Andrew STUBBS wrote:
> Daniel Jacobowitz wrote:
> >I had to look up what you meant by "ABI frame sniffer"; we normally
> >call this the prologue analyzer.
> 
> One registers the analyser using frame_unwind_append_sniffer(). The 
> currently configured analysers are called dwarf2_frame_sniffer() and 
> sh_frame_sniffer().
> 
> I can't imagine where I got the name from ;-)

I was complaning about the "ABI" part.  If you want to talk about what
kind of object it is, it's an unwinder, not a sniffer; sniffers are
used to select unwinders.

> Naturally you can't unwind ASM or anything without CFI without the 
> fallback unwinder. That's why it is there. That doesn't mean it isn't 
> irritating when it trys to unwind frames that aren't there. Most of the 
> time you just don't need it.

Quite on the contrary, my experience is that in most programs you'll
need it at least a couple of times, e.g. to get out of bits of libc or
linker-generated code.

> It may be possible to improve the unwinder. However, it is dependent on 
> the values in registers and in memory. It would be impossible to prevent 
> it getting occasionally confused.

Just like the rest of GDB on both counts.

> Besides which, the other problem I am trying to fix is that, before the 
> error, the unwinder would typically produce at least one bogus frame. 
> Even if the error has changed to a warning (as you say in the other 
> message) this would still be an irritant.

I know it's tempting to try to fix this with a broad stroke.  But
really, it is not appropriate.  Cases need to be handled one at a time
if you want the unwinder to work.

> I much prefer the option to say 'My program has CFI, I know it does, I 
> put it there, so stop trying to confuse yourself'.

For any frame with CFI, the CFI is used in preference.  If you don't
want the fallback unwinder to come into play, if as you claim you
really don't need it, then find out why it's being triggered in the
first place.

> As to the SH maintainers, there are none listed in MAINTAINERS.

Yes, my mistake; there used to be.

-- 
Daniel Jacobowitz
CodeSourcery, LLC


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