* h8300-tdep.c (h8300_push_dummy_call): Replace unsafe alloca
[deliverable/binutils-gdb.git] / gdb / f-valprint.c
index 229bfe30ac00761e97c135661c905e2bc43a5269..4359f6f62e9b4a45325f054e888a50aaeebbeea8 100644 (file)
@@ -267,7 +267,6 @@ f_val_print (struct type *type, const gdb_byte *valaddr, int embedded_offset,
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
   unsigned int i = 0;  /* Number of characters printed.  */
   struct type *elttype;
-  LONGEST val;
   CORE_ADDR addr;
   int index;
 
@@ -322,7 +321,10 @@ f_val_print (struct type *type, const gdb_byte *valaddr, int embedded_offset,
              return;
            }
 
-         if (options->addressprint && options->format != 's')
+         if (options->symbol_print)
+           want_space = print_address_demangle (options, gdbarch, addr,
+                                                stream, demangle);
+         else if (options->addressprint && options->format != 's')
            {
              fputs_filtered (paddress (gdbarch, addr), stream);
              want_space = 1;
@@ -503,6 +505,8 @@ info_common_command (char *comname, int from_tty)
 
   if (the_common)
     {
+      struct frame_id frame_id = get_frame_id (fi);
+
       if (strcmp (comname, BLANK_COMMON_NAME_LOCAL) == 0)
        printf_filtered (_("Contents of blank COMMON block:\n"));
       else
@@ -513,7 +517,18 @@ info_common_command (char *comname, int from_tty)
 
       while (entry != NULL)
        {
+         fi = frame_find_by_id (frame_id);
+         if (fi == NULL)
+           {
+             warning (_("Unable to restore previously selected frame."));
+             break;
+           }
+
          print_variable_and_value (NULL, entry->symbol, fi, gdb_stdout, 0);
+
+         /* print_variable_and_value invalidates FI.  */
+         fi = NULL;
+
          entry = entry->next;
        }
     }
This page took 0.025906 seconds and 4 git commands to generate.