]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Merged from mainline:
authorJim Blandy <jimb@codesourcery.com>
Fri, 17 Oct 2003 21:46:51 +0000 (21:46 +0000)
committerJim Blandy <jimb@codesourcery.com>
Fri, 17 Oct 2003 21:46:51 +0000 (21:46 +0000)
2003-09-22  Jim Blandy  <jimb@redhat.com>

* dwarf2read.c (read_array_type): When building the type for an
array of unspecified length, make sure to choose the upper bound
so that the array's total length comes out to be zero --- that's
how we represent such arrays.

gdb/ChangeLog
gdb/dwarf2read.c

index d1683d63f93ebef8b8b9446fffb82e474200a15c..27ea08b763d270e5cf84ddcfb39b05a0427cfb2c 100644 (file)
@@ -1,3 +1,14 @@
+2003-10-17  Jim Blandy  <jimb@redhat.com>
+
+       Merged from mainline: 
+       
+       2003-09-22  Jim Blandy  <jimb@redhat.com>
+
+       * dwarf2read.c (read_array_type): When building the type for an
+       array of unspecified length, make sure to choose the upper bound
+       so that the array's total length comes out to be zero --- that's
+       how we represent such arrays.
+
 2003-10-09  Daniel Jacobowitz  <drow@mvista.com>
 
        * remote-mips.c (mips_initialize): Remove unneeded call to
index da31c60642c70e8ebd8effdb78fc5d663f9d65aa..570a6ee8d830b8afd98a7abbc29b319e01786c96 100644 (file)
@@ -3100,8 +3100,14 @@ read_array_type (struct die_info *die, struct objfile *objfile,
                     with a DW_FORM_block1 attribute.
                     FIXME: GDB does not yet know how to handle dynamic
                     arrays properly, treat them as arrays with unspecified
-                    length for now.  */
-                 high = -1;
+                    length for now.
+
+                     FIXME: jimb/2003-09-22: GDB does not really know
+                     how to handle arrays of unspecified length
+                     either; we just represent them as zero-length
+                     arrays.  Choose an appropriate upper bound given
+                     the lower bound we've computed above.  */
+                 high = low - 1;
                }
              else
                {