This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 4/8] gdb/s390: Fill gen_return_address hook.
- From: Andreas Arnez <arnez at linux dot vnet dot ibm dot com>
- To: Marcin KoÅcielnicki <koriakin at 0x04 dot net>
- Cc: gdb-patches at sourceware dot org
- Date: Fri, 11 Mar 2016 16:31:14 +0100
- Subject: Re: [PATCH 4/8] gdb/s390: Fill gen_return_address hook.
- Authentication-results: sourceware.org; auth=none
- References: <1453637529-26972-5-git-send-email-koriakin at 0x04 dot net> <1454853751-18455-1-git-send-email-koriakin at 0x04 dot net> <m3bn6lz2fu dot fsf at oc1027705133 dot ibm dot com> <56E2AD82 dot 3060101 at 0x04 dot net> <m37fh9yzqn dot fsf at oc1027705133 dot ibm dot com> <56E2B95F dot 7050701 at 0x04 dot net>
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