diff options
author | Joel Brobecker <brobecker@gnat.com> | 2011-07-01 18:26:21 +0000 |
---|---|---|
committer | Joel Brobecker <brobecker@gnat.com> | 2011-07-01 18:26:21 +0000 |
commit | 2cf4d0554c8db2fecd52f1af1326c5d7843dfd95 (patch) | |
tree | 4d0ee9f01ba1e565c4607e7525a1974722cd97ca /gdb/ada-valprint.c | |
parent | 36c03aaf0dc3b0bb75b1e4427839a8ae588b4979 (diff) | |
download | gdb-2cf4d0554c8db2fecd52f1af1326c5d7843dfd95.tar.gz |
missing type description for typedef to pointer value
If we evaluate an expression that results in a value that is a typedef
to pointer, then the debugger fails to print the type description
before printing the actual value:
(gdb) print e.plan(1)
$1 = 0x0
The expected output is:
(gdb) print e.plan(1)
$1 = (access integer) 0x0
gdb/ChangeLog:
* ada-valprint.c (ada_value_print): Handle typedefs.
gdb/testsuite/ChangeLog:
* gdb.ada/ptr_typedef: New testcase.
Diffstat (limited to 'gdb/ada-valprint.c')
-rw-r--r-- | gdb/ada-valprint.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/ada-valprint.c b/gdb/ada-valprint.c index 09266ceb6be..f0901a8c137 100644 --- a/gdb/ada-valprint.c +++ b/gdb/ada-valprint.c @@ -956,7 +956,7 @@ ada_value_print (struct value *val0, struct ui_file *stream, { struct value *val = ada_to_fixed_value (val0); CORE_ADDR address = value_address (val); - struct type *type = value_type (val); + struct type *type = ada_check_typedef (value_type (val)); struct value_print_options opts; /* If it is a pointer, indicate what it points to. */ |