aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorJim Blandy <jimb@codesourcery.com>2003-09-23 16:25:13 +0000
committerJim Blandy <jimb@codesourcery.com>2003-09-23 16:25:13 +0000
commit8c2957c400a0b5564d7480e7f5cdd6453f1128c2 (patch)
tree043cc1e9a8744ef111cf2c35cc8b5a46c4424799 /gdb
parent010b84c1d31c9b6a24ec2d4407f7662c5db2470f (diff)
downloadgdb-8c2957c400a0b5564d7480e7f5cdd6453f1128c2.zip
gdb-8c2957c400a0b5564d7480e7f5cdd6453f1128c2.tar.gz
gdb-8c2957c400a0b5564d7480e7f5cdd6453f1128c2.tar.bz2
* 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.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog7
-rw-r--r--gdb/dwarf2read.c10
2 files changed, 15 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index c2d9797..1cefe8b 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,10 @@
+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-09-22 Michael Chastain <mec@shout.net>
* MAINTAINERS: Rename gdb.c++ to gdb.cp.
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index 468151f..bb614e5 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -3237,8 +3237,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
{