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


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

With the ABI sniffer 'off' it is not possible to backtrace through code that does not have CFI. On sh-elf, at least, there is always CFI when there is debug info, so it is relatively rare that the ABI sniffer is actually required.

I have not set the default to 'off' because that causes quite a number of FAILs in the testsuite.


That should be a hint...

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.


Obviously the SH maintainers have final say, but I strongly discourage
any patch along these lines.  If you want to improve the fallback
unwinder, go ahead.  If you want to add more generic tests to terminate
backtraces without annoying messages, we can discuss that.  But turning
it off is not viable.

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.


I did, when I origininally encountered the problem, try to detect the problem to avoid the messages, but all I ended up doing was detecting if it would give an error and declaring there were no more frames, which seemed pointless - it would hide the message when it really did mean something.

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 much prefer the option to say 'My program has CFI, I know it does, I put it there, so stop trying to confuse yourself'.

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

Andrew Stubbs


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