aboutsummaryrefslogtreecommitdiff
path: root/gdb/ada-lang.c
diff options
context:
space:
mode:
authorJoel Brobecker <brobecker@gnat.com>2010-04-20 22:38:02 +0000
committerJoel Brobecker <brobecker@gnat.com>2010-04-20 22:38:02 +0000
commitbe9425454f2d15a1c2512faa81de8777731aa4af (patch)
tree9fc150bb4e31828ff0ee4f553085b80b551fb83c /gdb/ada-lang.c
parent1ca8fce0468fd95a151c232ce91cd181eab5d4fe (diff)
downloadgdb-be9425454f2d15a1c2512faa81de8777731aa4af.zip
gdb-be9425454f2d15a1c2512faa81de8777731aa4af.tar.gz
gdb-be9425454f2d15a1c2512faa81de8777731aa4af.tar.bz2
"unsupported language" error in info types when using Ada.
This implements a rudimentary version of the la_print_typedef method for Ada. Ada usually does not use typedefs, but there is one exception: pointers to unconstrained arrays. Without this patch, we sometimes get an error in the "info types" output: (gdb) info types new_integer_type All types matching regular expression "new_integer_type": File foo.adb: Language not supported. For now, we treat the typedef as if it did not exist - using the underlying type instead. This is the right thing to do for most cases, the only exception being access to array types. Since we already have a general issue in handling these pointers (we confuse them with fat pointers), we will enhance ada_print_typedef to handle these pointers at the same time we address the general issue. gdb/ChangeLog: * ada-typeprint.c (ada_print_typedef): New function. * ada-lang.h (ada_print_typedef): Add declaration. * ada-lang.c (ada_language_defn): set la_print_typdef field to ada_print_typedef. gdb/testsuite/ChangeLog: * info_types.c, info_types.exp: New files. Tested on x86_64-linux.
Diffstat (limited to 'gdb/ada-lang.c')
-rw-r--r--gdb/ada-lang.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c
index df8ff19..a598c6d 100644
--- a/gdb/ada-lang.c
+++ b/gdb/ada-lang.c
@@ -11276,7 +11276,7 @@ const struct language_defn ada_language_defn = {
ada_printstr, /* Function to print string constant */
emit_char, /* Function to print single char (not used) */
ada_print_type, /* Print a type using appropriate syntax */
- default_print_typedef, /* Print a typedef using appropriate syntax */
+ ada_print_typedef, /* Print a typedef using appropriate syntax */
ada_val_print, /* Print a value using appropriate syntax */
ada_value_print, /* Print a top-level value */
NULL, /* Language specific skip_trampoline */