summaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.ada/packed_array.exp
diff options
context:
space:
mode:
authorJoel Brobecker <brobecker@gnat.com>2011-07-01 18:27:25 +0000
committerJoel Brobecker <brobecker@gnat.com>2011-07-01 18:27:25 +0000
commitd2d43431e83ac661e10934eb1c3fb7542c087527 (patch)
tree88b68c3833b99d01e59620eb08715ea76ba0f684 /gdb/testsuite/gdb.ada/packed_array.exp
parent54ae186fb505f4873858ae56b2298c9471f9eaee (diff)
downloadbinutils-gdb-d2d43431e83ac661e10934eb1c3fb7542c087527.tar.gz
Fix printing address of packed array
When trying to print the address of a non-packed array, GDB correctly prints the type name and address: (gdb) print &var $2 = (access pa.var) 0xbffff1d8 However, it is behaving differently when dealing with a packed array: (gdb) p &var (access array (4 .. 8) of boolean <packed: 1-bit elements>) (4 => false, false, false, true, false) The type description isn't all that bad, but GDB shouldn't be printing the array value! This patch fixes the `print` and `ptype` command on packed and non-packed array. It also fixes a gdb.ada test to match with the new ouput. gdb/ChangeLog (Jean-Charles Delay): * ada-typeprint.c (ada_print_type): Fix both PAD type and pointer to constrained packed array type output. * ada-valprint.c (ada_val_print_1): Fix pointer to constrained packed array output. gdb/testsuite/ChangeLog (Jean-Charles Delay): * gdb.ada/packed_array.exp: Fix expected outout.
Diffstat (limited to 'gdb/testsuite/gdb.ada/packed_array.exp')
-rw-r--r--gdb/testsuite/gdb.ada/packed_array.exp2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/testsuite/gdb.ada/packed_array.exp b/gdb/testsuite/gdb.ada/packed_array.exp
index 331887388a5..ef7c8b4644d 100644
--- a/gdb/testsuite/gdb.ada/packed_array.exp
+++ b/gdb/testsuite/gdb.ada/packed_array.exp
@@ -48,7 +48,7 @@ gdb_test "ptype &var" \
"ptype &var"
gdb_test "print &var" \
- "= \\(access array \\(4 \\.\\. 8\\) of boolean <packed: 1-bit elements>\\) \\(4 => true, false, true, false, true\\)" \
+ "= \\(access pa.packed_array\\) 0x.*" \
"print &var"
# Print the value of U_Var, an unconstrainted packed array.