stack: fix gdb.dwarf2/dw2-undefined-ret-addr.exp regression

Commit a038fa3e14 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.
This commit is contained in:
Markus Metzger 2016-07-22 10:01:19 +02:00
parent fcddde94ee
commit c620c3e48d
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2016-10-06 Markus Metzger <markus.t.metzger@intel.com>
* stack.c (frame_info): Call val_print_not_saved instead of
val_print_unavailable if frame_id check fails.
2016-10-06 Pedro Alves <palves@redhat.com>
* jit.c (free_objfile_data): Delete the JIT breakpoint and clear

View File

@ -1531,7 +1531,7 @@ frame_info (char *addr_exp, int from_tty)
printf_filtered ("saved %s = ", pc_regname);
if (!frame_id_p (frame_unwind_caller_id (fi)))
val_print_unavailable (gdb_stdout);
val_print_not_saved (gdb_stdout);
else
{
TRY