From 47061676f3da3108858c4bb154c4de16afde28b1 Mon Sep 17 00:00:00 2001 From: Andrew Burgess Date: Wed, 4 Sep 2013 16:34:07 +0000 Subject: [PATCH] Avoid printing unavailable/optimized out registers (sh64-tdep.c) https://sourceware.org/ml/gdb-patches/2013-08/msg00834.html gdb/ChangeLog * sh64-tdep.c (sh64_do_register): Return after printing message about unavailable register contents. --- gdb/ChangeLog | 5 +++++ gdb/sh64-tdep.c | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index de171119e54..a8bc3cb99f6 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2013-09-04 Andrew Burgess + + * sh64-tdep.c (sh64_do_register): Return after printing message + about unavailable register contents. + 2013-09-04 Muhammad Bilal Pedro Alves diff --git a/gdb/sh64-tdep.c b/gdb/sh64-tdep.c index b640b1d2aad..e9ce42bef9d 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; -- 2.30.2