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

Andreas Arnez
2016-03-11T15:31:22Z

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