diff options
author | Tom Tromey <tromey@redhat.com> | 2010-01-25 19:31:24 +0000 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2010-01-25 19:31:24 +0000 |
commit | 421d5d99a304a36cd40126d1e155bb23a8cee02d (patch) | |
tree | 1406b1cacf262e5a310daab57d05f5e16bb377a9 | |
parent | 2aa2364a8901583a5d0ffbbf64e7baed4a52f4e1 (diff) | |
download | gdb-421d5d99a304a36cd40126d1e155bb23a8cee02d.zip gdb-421d5d99a304a36cd40126d1e155bb23a8cee02d.tar.gz gdb-421d5d99a304a36cd40126d1e155bb23a8cee02d.tar.bz2 |
gdb
PR gdb/11049:
* c-valprint.c (c_val_print): Fix test of extract_unsigned_integer
result.
gdb/testsuite
PR gdb/11049:
* gdb.base/printcmds.exp (test_print_typedef_arrays): Add test
with "set print null-stop on".
-rw-r--r-- | gdb/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/c-valprint.c | 2 | ||||
-rw-r--r-- | gdb/testsuite/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/printcmds.exp | 5 |
4 files changed, 18 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 8ab26f6..feb59a1 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2010-01-25 Tom Tromey <tromey@redhat.com> + + PR gdb/11049: + * c-valprint.c (c_val_print): Fix test of extract_unsigned_integer + result. + 2010-01-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> * configure.ac: Only use host_os part when disabling TUI on osf. diff --git a/gdb/c-valprint.c b/gdb/c-valprint.c index 00c3c9a..d681a03 100644 --- a/gdb/c-valprint.c +++ b/gdb/c-valprint.c @@ -191,7 +191,7 @@ c_val_print (struct type *type, const gdb_byte *valaddr, int embedded_offset, && temp_len < options->print_max && extract_unsigned_integer (valaddr + embedded_offset + temp_len * eltlen, - eltlen, byte_order) == 0); + eltlen, byte_order) != 0); ++temp_len) ; len = temp_len; diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index c06f0a1..61a01f3 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2010-01-25 Tom Tromey <tromey@redhat.com> + + PR gdb/11049: + * gdb.base/printcmds.exp (test_print_typedef_arrays): Add test + with "set print null-stop on". + 2010-01-24 Jan Kratochvil <jan.kratochvil@redhat.com> * gdb.arch/i386-bp_permanent.exp (Disassemble function '$function'): diff --git a/gdb/testsuite/gdb.base/printcmds.exp b/gdb/testsuite/gdb.base/printcmds.exp index 74ea6ed..2f4b0cc 100644 --- a/gdb/testsuite/gdb.base/printcmds.exp +++ b/gdb/testsuite/gdb.base/printcmds.exp @@ -582,6 +582,11 @@ proc test_print_typedef_arrays {} { " = \"abcd\"" gdb_test "p a2\[0\]" " = 97 'a'" gdb_test "p a2\[3\]" " = 100 'd'" + + # Regression test of null-stop; PR 11049. + gdb_test "set print null-stop on" "" + gdb_test "p a2" " = \"abcd\"" "print a2 with null-stop on" + gdb_test "set print null-stop off" "" } proc test_artificial_arrays {} { |