This is the mail archive of the
gdb-cvs@sourceware.org
mailing list for the GDB project.
src/gdb ChangeLog valprint.c
- From: brobecke at sourceware dot org
- To: gdb-cvs at sourceware dot org
- Date: 3 Nov 2010 23:20:13 -0000
- Subject: src/gdb ChangeLog valprint.c
CVSROOT: /cvs/src
Module name: src
Changes by: brobecke@sourceware.org 2010-11-03 23:20:13
Modified files:
gdb : ChangeLog valprint.c
Log message:
[Ada] fix warning when printing empty array
This patch should fix the following regression:
(gdb) print my_table
-$1 = ()
-(gdb) PASS: gdb.ada/null_array.exp: print my_table
+$1 = (warning: unable to get bounds of array, assuming null array
+)
+(gdb) FAIL: gdb.ada/null_array.exp: print my_table
The problem was introduced by a change in val_print_array_elements
which removed a check for the case where the array's high bound
is smaller than the array's low bound (empty array).
This change restores the check and forces the len to zero in that case.
Looking at the patch that caused the regression, I suspect that we may
have other parts that might have been broken (non-zero array low bound?).
gdb/ChangeLog:
* valprint.c (val_print_array_elements): Put back handling of
empty arrays.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/ChangeLog.diff?cvsroot=src&r1=1.12290&r2=1.12291
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/valprint.c.diff?cvsroot=src&r1=1.98&r2=1.99