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: Pedro Alves <palves at redhat dot com>
- Cc: Eli Zaretskii <eliz at gnu dot org>
- Cc: Marcin KoÅcielnicki <koriakin at 0x04 dot net>, gdb-patches at sourceware dot org
- Date: Fri, 11 Mar 2016 17:45:16 +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> <m337rxyqt9 dot fsf at oc1027705133 dot ibm dot com> <56E2E7C8 dot 7050901 at redhat dot com>
On Fri, Mar 11 2016, Pedro Alves wrote:
> On 03/11/2016 03:31 PM, Andreas Arnez wrote:
>> 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.
>
> I think that should be put in the manual, even. Users will also trip on
> this, not just our tests.
Right, I thought about this as well. How about this?
-- >8 --
Subject: [PATCH] Document possible unreliability of `$_ret'
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index 4ec0ec1..a14fe19 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -12863,7 +12863,9 @@ Collect all local variables.
@item $_ret
Collect the return address. This is helpful if you want to see more
-of a backtrace.
+of a backtrace. Note that the return address can not always be
+determined reliably, and a wrong address may be collected instead.
+The reliability is usually higher for tracepoints at function entry.
@item $_probe_argc
Collects the number of arguments from the static probe at which the