X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=gdb%2Ff-typeprint.c;h=9e148fb8306dda84e2b582cff1e94a1c06cb4089;hb=931758afc4b86ded4b4574c7c119a60f853641da;hp=681b449145df5d08aeac409450bc695f33bd7ade;hpb=fba45db2faf619e71856ee38ec63949c0ef6903e;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/f-typeprint.c b/gdb/f-typeprint.c index 681b449145..9e148fb830 100644 --- a/gdb/f-typeprint.c +++ b/gdb/f-typeprint.c @@ -1,5 +1,8 @@ /* Support for printing Fortran types for GDB, the GNU debugger. - Copyright 1986, 1988, 1989, 1991, 1993, 1994, 2000 Free Software Foundation, Inc. + + Copyright 1986, 1988, 1989, 1991, 1993, 1994, 1995, 1996, 1998, + 2000, 2001, 2002, 2003 Free Software Foundation, Inc. + Contributed by Motorola. Adapted from the C version by Farooq Butt (fmbutt@engage.sps.mot.com). @@ -21,7 +24,7 @@ Boston, MA 02111-1307, USA. */ #include "defs.h" -#include "obstack.h" +#include "gdb_obstack.h" #include "bfd.h" #include "symtab.h" #include "gdbtypes.h" @@ -29,13 +32,7 @@ #include "value.h" #include "gdbcore.h" #include "target.h" -#include "command.h" -#include "gdbcmd.h" -#include "language.h" -#include "demangle.h" #include "f-lang.h" -#include "typeprint.h" -#include "frame.h" /* ??? */ #include "gdb_string.h" #include @@ -62,7 +59,7 @@ void f_print_type (struct type *type, char *varstring, struct ui_file *stream, int show, int level) { - register enum type_code code; + enum type_code code; int demangled_args; f_type_print_base (type, stream, show, level); @@ -151,42 +148,6 @@ f_type_print_varspec_prefix (struct type *type, struct ui_file *stream, } } -#if 0 /* Currently unused */ - -static void -f_type_print_args (struct type *type, struct ui_file *stream) -{ - int i; - struct type **args; - - fprintf_filtered (stream, "("); - args = TYPE_ARG_TYPES (type); - if (args != NULL) - { - if (args[1] == NULL) - { - fprintf_filtered (stream, "..."); - } - else - { - for (i = 1; args[i] != NULL && args[i]->code != TYPE_CODE_VOID; i++) - { - f_print_type (args[i], "", stream, -1, 0); - if (args[i + 1] == NULL) - fprintf_filtered (stream, "..."); - else if (args[i + 1]->code != TYPE_CODE_VOID) - { - fprintf_filtered (stream, ","); - wrap_here (" "); - } - } - } - } - fprintf_filtered (stream, ")"); -} - -#endif /* 0 */ - /* Print any array sizes, function arguments or close parentheses needed after the variable name (to describe its type). Args work like c_type_print_varspec_prefix. */ @@ -368,6 +329,11 @@ f_type_print_base (struct type *type, struct ui_file *stream, int show, f_type_print_base (TYPE_TARGET_TYPE (type), stream, 0, level); break; + case TYPE_CODE_REF: + fprintf_filtered (stream, "REF TO -> ( "); + f_type_print_base (TYPE_TARGET_TYPE (type), stream, 0, level); + break; + case TYPE_CODE_VOID: fprintf_filtered (stream, "VOID"); break; @@ -395,7 +361,7 @@ f_type_print_base (struct type *type, struct ui_file *stream, int show, through as TYPE_CODE_INT since dbxstclass.h is so C-oriented, we must change these to "character" from "char". */ - if (STREQ (TYPE_NAME (type), "char")) + if (strcmp (TYPE_NAME (type), "char") == 0) fprintf_filtered (stream, "character"); else goto default_case;