> Andrew Cagney wrote: > > >>>> > Hello, >>>> > >>>> > this patch fixes the gdb.base/gdb1476.exp test case (backtrace from NULL >>>> > function pointer call). >>>> > >>>> > When calling via an invalid function pointer, what we should do is simply >>>> > unwind the PC from the return address register and continue. This is >>>> > exactly what is done to unwind from a PLT stub as well, so the patch >>>> > simply uses the PLT frame unwinder to handle this case as well. >> >>> >>> While that might be true, I don't know that its the job of something >>> called "PLTSTUB". > > > Yes, the name's a bit unfortunate. What this unwinder does is basically > unwind from any situation where we don't have a proper function prolog. > It could in theory handle all kinds of stubs, trampolines etc. > > >>> I can think of either: >>> - renaming pltstub to something that matches its new purpose (just "stub"?) > > > This would be my preferred solution. Try the attached. Andrew >>> - using the default unwinder > > > The default unwinder as it is now would handle the situation incorrectly. > I could build the stub detection logic into the default unwinder, but that > would make it even more complex than it already is; I would think with the > new frame logic it is preferable to have multiple unwinders rather than a > single one that handles everything. > > Bye, > Ulrich