aboutsummaryrefslogtreecommitdiff
path: root/gdb/ada-valprint.c
diff options
context:
space:
mode:
authorJoel Brobecker <brobecker@gnat.com>2011-07-01 18:26:22 +0000
committerJoel Brobecker <brobecker@gnat.com>2011-07-01 18:26:22 +0000
commitf5aa6869dee6874a9d1a3a386b1d5893f0ac46d4 (patch)
tree0098e3bc7f01558d16d658f54cf62df7416462b9 /gdb/ada-valprint.c
parent8f465ea731ea6181bdbc86b36dc2df0b9b1f8520 (diff)
downloadgdb-f5aa6869dee6874a9d1a3a386b1d5893f0ac46d4.zip
gdb-f5aa6869dee6874a9d1a3a386b1d5893f0ac46d4.tar.gz
gdb-f5aa6869dee6874a9d1a3a386b1d5893f0ac46d4.tar.bz2
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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/ada-valprint.c b/gdb/ada-valprint.c
index 09266ce..f0901a8 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. */