From: "Metzger, Markus T" <markus.t.metzger@intel.com>
To: Yao Qi <qiyaoltc@gmail.com>
Cc: Pedro Alves <palves@redhat.com>,
"gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: RE: [PATCH v3 2/3] stack: check frame_unwind_caller_id
Date: Fri, 22 Jul 2016 07:53:00 -0000 [thread overview]
Message-ID: <A78C989F6D9628469189715575E55B23332F7BA0@IRSMSX104.ger.corp.intel.com> (raw)
In-Reply-To: <CAH=s-PNZKqi5KMb4-XzR905EgN==7jV8vi-Nrtz=0Jvre9OxMA@mail.gmail.com>
> -----Original Message-----
> From: Yao Qi [mailto:qiyaoltc@gmail.com]
> Sent: Thursday, July 21, 2016 6:36 PM
> To: Metzger, Markus T <markus.t.metzger@intel.com>
> Cc: Pedro Alves <palves@redhat.com>; gdb-patches@sourceware.org
> Subject: Re: [PATCH v3 2/3] stack: check frame_unwind_caller_id
Hi Yao,
> 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.
I found a comment in value.c:333 that suggests GDB uses optimized-out for
registers that are not stored in the frame. Since the patch is handling the case
of an invalid frame-id I guess I should have used val_print_not_saved instead
of val_print_unavailable.
Let me revert Jan's fix and see if changing it to val_print_not_saved causes other
regressions.
regards,
Markus.
Intel Deutschland GmbH
Registered Address: Am Campeon 10-12, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de
Managing Directors: Christin Eisenschmid, Christian Lamprechter
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928
next prev parent reply other threads:[~2016-07-22 7:53 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-11 16:14 [PATCH v3 1/3] frame: add skip_tailcall_frames Markus Metzger
2016-02-11 16:15 ` [PATCH v3 3/3] btrace, frame: fix crash in get_frame_type Markus Metzger
2016-02-11 16:26 ` Pedro Alves
2016-02-11 16:15 ` [PATCH v3 2/3] stack: check frame_unwind_caller_id Markus Metzger
2016-02-11 16:21 ` Pedro Alves
2016-07-21 16:35 ` Yao Qi
2016-07-22 7:53 ` Metzger, Markus T [this message]
2016-02-11 16:21 ` [PATCH v3 1/3] frame: add skip_tailcall_frames Pedro Alves
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=A78C989F6D9628469189715575E55B23332F7BA0@IRSMSX104.ger.corp.intel.com \
--to=markus.t.metzger@intel.com \
--cc=gdb-patches@sourceware.org \
--cc=palves@redhat.com \
--cc=qiyaoltc@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox