This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH] sh64-tdep.c don't print unavailabel/optimized-out values.
- From: "Andrew Burgess" <aburgess at broadcom dot com>
- To: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Wed, 28 Aug 2013 16:50:09 +0100
- Subject: [PATCH] sh64-tdep.c don't print unavailabel/optimized-out values.
- Authentication-results: sourceware.org; auth=none
Spotted that in sh64-tdep.c we sometimes try to print optimized
out or unavailable values.
This patch is untested (other than building with enable all targets),
but I find it hard to believe what we have is the desired behaviour.
I'm also comparing to infcmd.c:default_print_one_register_info as an
example of how other targets behave.
OK to apply?
Andrew
gdb/ChangeLog
2013-08-28 Andrew Burgess <aburgess@broadcom.com>
* sh64-tdep.c (sh64_do_register): Return after printing message
about unavailable register contents.
diff --git a/gdb/sh64-tdep.c b/gdb/sh64-tdep.c
index b640b1d..e9ce42b 100644
--- a/gdb/sh64-tdep.c
+++ b/gdb/sh64-tdep.c
@@ -2045,7 +2045,10 @@ sh64_do_register (struct gdbarch *gdbarch, struct ui_file *file,
/* Get the data in raw format. */
if (!deprecated_frame_register_read (frame, regnum, raw_buffer))
- fprintf_filtered (file, "*value not available*\n");
+ {
+ fprintf_filtered (file, "*value not available*\n");
+ return;
+ }
get_formatted_print_options (&opts, 'x');
opts.deref_ref = 1;