From be9425454f2d15a1c2512faa81de8777731aa4af Mon Sep 17 00:00:00 2001 From: Joel Brobecker Date: Tue, 20 Apr 2010 22:38:02 +0000 Subject: "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. --- gdb/ada-lang.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'gdb/ada-lang.h') diff --git a/gdb/ada-lang.h b/gdb/ada-lang.h index 017cff2..3d60f8f 100644 --- a/gdb/ada-lang.h +++ b/gdb/ada-lang.h @@ -159,6 +159,9 @@ extern void ada_error (char *); /* Defined in ada-exp.y */ extern void ada_print_type (struct type *, char *, struct ui_file *, int, int); +extern void ada_print_typedef (struct type *type, struct symbol *new_symbol, + struct ui_file *stream); + extern int ada_val_print (struct type *, const gdb_byte *, int, CORE_ADDR, struct ui_file *, int, const struct value_print_options *); -- cgit v1.1