gdb/fortran: Implement la_print_typedef for Fortran
Implement an la_print_typedef method for Fortran, this allows 'info types' to work for Fortran. The implementation is just copied from ada_print_typedef (with the appropriate changes). To support the testing of this patch I added a new proc, fortran_character1, to lib/fortran.exp which returns a regexp to match a 1-byte character type. The regexp returned is correct for current versions of gFortran. All of the other regexp are guesses based on all of the other support procs in lib/fortran.exp, I haven't tested them myself. gdb/ChangeLog: * f-lang.c (f_language_defn): Use f_print_typedef. * f-lang.h (f_print_typedef): Declare. * f-typeprint.c (f_print_typedef): Define. gdb/testsuite/ChangeLog: * gdb.fortran/info-types.exp: New file. * gdb.fortran/info-types.f90: New file. * lib/fortran.exp (fortran_character1): New proc.
This commit is contained in:
parent
fa463e9fc6
commit
1f20c35ea4
8 changed files with 111 additions and 1 deletions
|
@ -644,7 +644,7 @@ extern const struct language_defn f_language_defn =
|
|||
f_printstr, /* function to print string constant */
|
||||
f_emit_char, /* Function to print a single character */
|
||||
f_print_type, /* Print a type using appropriate syntax */
|
||||
default_print_typedef, /* Print a typedef using appropriate syntax */
|
||||
f_print_typedef, /* Print a typedef using appropriate syntax */
|
||||
f_val_print, /* Print a value using appropriate syntax */
|
||||
c_value_print, /* FIXME */
|
||||
default_read_var_value, /* la_read_var_value */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue