This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] stack: fix gdb.dwarf2/dw2-undefined-ret-addr.exp regression
- From: Yao Qi <qiyaoltc at gmail dot com>
- To: Markus Metzger <markus dot t dot metzger at intel dot com>
- Cc: gdb-patches at sourceware dot org, qiyaoltc at gmail dot com, palves at redhat dot com
- Date: Thu, 06 Oct 2016 10:32:17 +0100
- Subject: Re: [PATCH] stack: fix gdb.dwarf2/dw2-undefined-ret-addr.exp regression
- Authentication-results: sourceware.org; auth=none
- References: <1469185962-28925-1-git-send-email-markus.t.metzger@intel.com>
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 (齐尧)