Avoid printing unavailable/optimized out registers (sh64-tdep.c)
authorAndrew Burgess <aburgess@broadcom.com>
Wed, 4 Sep 2013 16:34:07 +0000 (16:34 +0000)
committerAndrew Burgess <aburgess@broadcom.com>
Wed, 4 Sep 2013 16:34:07 +0000 (16:34 +0000)
  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
gdb/sh64-tdep.c

index de171119e54625060faaa34d98939d36c0ccf05e..a8bc3cb99f62062089c184e988d87fe4e3376e70 100644 (file)
@@ -1,3 +1,8 @@
+2013-09-04  Andrew Burgess  <aburgess@broadcom.com>
+
+       * sh64-tdep.c (sh64_do_register): Return after printing message
+       about unavailable register contents.
+
 2013-09-04  Muhammad Bilal  <mbilal@codesourcery.com>
             Pedro Alves  <palves@redhat.com>
 
index b640b1d2aad51d571b931e250c292cdf5bf8e394..e9ce42bef9d482cf6815578264bbc50b3a428cd6 100644 (file)
@@ -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;