Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Yao Qi <qiyaoltc@gmail.com>
To: Markus Metzger <markus.t.metzger@intel.com>
Cc: gdb-patches@sourceware.org,  qiyaoltc@gmail.com,  palves@redhat.com
Subject: Re: [PATCH] stack: fix gdb.dwarf2/dw2-undefined-ret-addr.exp regression
Date: Thu, 06 Oct 2016 09:32:00 -0000	[thread overview]
Message-ID: <86shs9akm6.fsf@gmail.com> (raw)
In-Reply-To: <1469185962-28925-1-git-send-email-markus.t.metzger@intel.com>	(Markus Metzger's message of "Fri, 22 Jul 2016 13:12:42 +0200")

Markus Metzger <markus.t.metzger@intel.com> writes:

> Commit a038fa3e14a4 stack: check frame_unwind_caller_id adds a frame_id check to
> frame_info and treats a missing frame_id as NOT_AVAILABLE_ERROR.  This causes a
> regression in gdb.dwarf2/dw2-undefined-ret-addr.exp.
>
> Treat a missing frame_id as OPTIMIZED_OUT_ERROR instead.
>
> See also https://sourceware.org/ml/gdb-patches/2016-07/msg00273.html.
>
> 2016-07-22  Markus Metzger  <markus.t.metzger@intel.com>
>
> gdb/
> 	* stack.c (frame_info): Call val_print_not_saved instead of
> 	val_print_unavailable if frame_id check fails.

It is good to me.  I read this patch several times since July, because
of something else in a038fa3e14a4.  Do we need to move
frame_unwind_caller_id into try block? like this,

  TRY
   {
      if (!frame_id_p (frame_unwind_caller_id (fi)))
         val_print_unavailable (gdb_stdout);
      else
       {
          caller_pc = frame_unwind_caller_pc (fi);
          caller_pc_p = 1;
       }
   }
  CATCH (ex, ....)

frame_unwind_caller_id calls get_prev_frame_always which only catches
MEMORY_ERROR.  IIUC, get_prev_frame_always and it callees may throw
NOT_AVAILABLE_ERROR.

-- 
Yao (齐尧)


  reply	other threads:[~2016-10-06  9:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-22 11:13 Markus Metzger
2016-10-06  9:32 ` Yao Qi [this message]
2016-10-06 11:03   ` Metzger, Markus T
2016-10-06 12:21     ` Yao Qi

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=86shs9akm6.fsf@gmail.com \
    --to=qiyaoltc@gmail.com \
    --cc=gdb-patches@sourceware.org \
    --cc=markus.t.metzger@intel.com \
    --cc=palves@redhat.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