[PATCH] Fix gdb1476.exp on s390*

Ulrich Weigand weigand@i1.informatik.uni-erlangen.de
Mon Mar 22 19:05:00 GMT 2004


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.

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

-- 
  Dr. Ulrich Weigand
  weigand@informatik.uni-erlangen.de



More information about the Gdb-patches mailing list