This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [PATCH] Fix gdb1476.exp on s390*
- From: Ulrich Weigand <weigand at i1 dot informatik dot uni-erlangen dot de>
- To: cagney at gnu dot org (Andrew Cagney)
- Cc: weigand at i1 dot informatik dot uni-erlangen dot de (Ulrich Weigand), gdb-patches at sources dot redhat dot com
- Date: Mon, 22 Mar 2004 20:05:01 +0100 (CET)
- Subject: Re: [PATCH] Fix gdb1476.exp on s390*
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