* c-valprint.c (c_val_print): Fix thinko with unspecified length
authorJim Kingdon <jkingdon@engr.sgi.com>
Mon, 12 Jul 1993 18:00:48 +0000 (18:00 +0000)
committerJim Kingdon <jkingdon@engr.sgi.com>
Mon, 12 Jul 1993 18:00:48 +0000 (18:00 +0000)
arrays.

gdb/ChangeLog
gdb/c-valprint.c

index cd7304f80e71cf30ee2ff87bcd7e3b504dada9c9..982ce2b144f67e95d489bf99895f63292a24b2e9 100644 (file)
@@ -1,5 +1,8 @@
 Mon Jul 12 11:29:44 1993  Jim Kingdon  (kingdon@lioth.cygnus.com)
 
+       * c-valprint.c (c_val_print): Fix thinko with unspecified length
+       arrays.
+
        * hppa-tdep.c (find_proc_framesize): If there is a frame pointer,
        use it.
 
index dca35f3dd1dcef32dc1ce24058e097f41b8a58fc..f50432d40be1722a3dc67b7ca92f0e9cf514241e 100644 (file)
@@ -137,8 +137,8 @@ c_val_print (type, valaddr, address, stream, format, deref_ref, recurse,
          break;
        }
       /* Array of unspecified length: treat like pointer to first elt.  */
-      valaddr = (char *) &address;
-      /* FALL THROUGH */
+      addr = address;
+      goto print_unpacked_pointer;
 
     case TYPE_CODE_PTR:
       if (format && format != 's')
@@ -159,6 +159,7 @@ c_val_print (type, valaddr, address, stream, format, deref_ref, recurse,
       else
        {
          addr = unpack_pointer (type, valaddr);
+       print_unpacked_pointer:
          elttype = TYPE_TARGET_TYPE (type);
 
          if (TYPE_CODE (elttype) == TYPE_CODE_FUNC)
This page took 0.027063 seconds and 4 git commands to generate.