This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH v3 2/3] stack: check frame_unwind_caller_id
- From: Yao Qi <qiyaoltc at gmail dot com>
- To: Markus Metzger <markus dot t dot metzger at intel dot com>
- Cc: Pedro Alves <palves at redhat dot com>, "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Thu, 21 Jul 2016 17:35:43 +0100
- Subject: Re: [PATCH v3 2/3] stack: check frame_unwind_caller_id
- Authentication-results: sourceware.org; auth=none
- References: <1455207283-12660-1-git-send-email-markus.t.metzger@intel.com> <1455207283-12660-2-git-send-email-markus.t.metzger@intel.com>
Hi Markus,
On Thu, Feb 11, 2016 at 4:14 PM, Markus Metzger
<markus.t.metzger@intel.com> wrote:
> diff --git a/gdb/stack.c b/gdb/stack.c
> index 89879f3..6e3acc7 100644
> --- a/gdb/stack.c
> +++ b/gdb/stack.c
> @@ -1509,27 +1509,32 @@ frame_info (char *addr_exp, int from_tty)
> wrap_here (" ");
> printf_filtered ("saved %s = ", pc_regname);
>
> - TRY
> - {
> - caller_pc = frame_unwind_caller_pc (fi);
> - caller_pc_p = 1;
> - }
> - CATCH (ex, RETURN_MASK_ERROR)
> + if (!frame_id_p (frame_unwind_caller_id (fi)))
> + val_print_unavailable (gdb_stdout);
> + else
This patch causes a fail
FAIL: gdb.dwarf2/dw2-undefined-ret-addr.exp: info frame
because part of the output "info frame" is changed from "saved rip =
<not saved>"
to "saved rip = <unavailable>". The regression is caught by buildbot too
https://sourceware.org/ml/gdb-testers/2016-q1/msg05292.html
Could you take a look?
Note that Jan posted a patch
https://sourceware.org/ml/gdb-patches/2016-04/msg00181.html
fixing test case, but I think the test case itself is valid. Also in the commit
log of adding gdb.dwarf2/dw2-undefined-ret-addr.exp, it is intended to match
"<not saved>" in the test.
--
Yao (齐尧)