[PATCH 4/8] gdb/s390: Fill gen_return_address hook.

Andreas Arnez arnez@linux.vnet.ibm.com
Fri Mar 11 15:31:00 GMT 2016


On Fri, Mar 11 2016, Marcin Kościelnicki wrote:

> We can always error() in there (and KFAIL the testcase in gdb.trace
> that exercises it).  However, returning garbage here doesn't result in
> garbage backtrace - this only collects data, if the unwinder actually
> doing the work later determines it should look for the return address
> on the stack, it'll just ignore our collected $r14 and consider the
> return address unavailable (unless another collect rule happened to
> match it).

Well, from that test case it appears that `$_ret' is generally not
expected to work very reliably.  Since r14 usually does work near
function entry, this may be sufficient for now.

So I'm OK with the patch.  Please add a small comment stating that this
is a best-can-do approach that usually works near function entry and may
yield wrong results otherwise.

-- 
Andreas



More information about the Gdb-patches mailing list