diff options
Diffstat (limited to 'gdb/f-valprint.c')
-rw-r--r-- | gdb/f-valprint.c | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/gdb/f-valprint.c b/gdb/f-valprint.c index d629d8b..23331b1 100644 --- a/gdb/f-valprint.c +++ b/gdb/f-valprint.c @@ -40,12 +40,13 @@ static int there_is_a_visible_common_named PARAMS ((char *)); static void info_common_command PARAMS ((char *, int)); static void list_all_visible_commons PARAMS ((char *)); static void f77_print_array PARAMS ((struct type *, char *, CORE_ADDR, - FILE *, int, int, int, + GDB_FILE *, int, int, int, enum val_prettyprint)); static void f77_print_array_1 PARAMS ((int, int, struct type *, char *, - CORE_ADDR, FILE *, int, int, int, + CORE_ADDR, GDB_FILE *, int, int, int, enum val_prettyprint)); -static void f77_create_arrayprint_offset_tbl PARAMS ((struct type *, FILE *)); +static void f77_create_arrayprint_offset_tbl PARAMS ((struct type *, + GDB_FILE *)); static void f77_get_dynamic_length_of_aggregate PARAMS ((struct type *)); int f77_array_offset_tbl[MAX_FORTRAN_DIMS+1][2]; @@ -231,7 +232,7 @@ f77_get_dynamic_length_of_aggregate (type) static void f77_create_arrayprint_offset_tbl (type, stream) struct type *type; - FILE *stream; + GDB_FILE *stream; { struct type *tmp_type; int eltlen; @@ -285,7 +286,7 @@ f77_print_array_1 (nss, ndimensions, type, valaddr, address, struct type *type; char *valaddr; CORE_ADDR address; - FILE *stream; + GDB_FILE *stream; int format; int deref_ref; int recurse; @@ -311,6 +312,7 @@ f77_print_array_1 (nss, ndimensions, type, valaddr, address, { val_print (TYPE_TARGET_TYPE (type), valaddr + i * F77_DIM_OFFSET (ndimensions), + 0, address + i * F77_DIM_OFFSET (ndimensions), stream, format, deref_ref, recurse, pretty); @@ -332,7 +334,7 @@ f77_print_array (type, valaddr, address, stream, format, deref_ref, recurse, struct type *type; char *valaddr; CORE_ADDR address; - FILE *stream; + GDB_FILE *stream; int format; int deref_ref; int recurse; @@ -371,12 +373,13 @@ f77_print_array (type, valaddr, address, stream, format, deref_ref, recurse, The PRETTY parameter controls prettyprinting. */ int -f_val_print (type, valaddr, address, stream, format, deref_ref, recurse, +f_val_print (type, valaddr, embedded_offset, address, stream, format, deref_ref, recurse, pretty) struct type *type; char *valaddr; + int embedded_offset; CORE_ADDR address; - FILE *stream; + GDB_FILE *stream; int format; int deref_ref; int recurse; @@ -534,7 +537,7 @@ f_val_print (type, valaddr, address, stream, format, deref_ref, recurse, { /* Bash the type code temporarily. */ TYPE_CODE (type) = TYPE_CODE_INT; - f_val_print (type, valaddr, address, stream, format, + f_val_print (type, valaddr, 0, address, stream, format, deref_ref, recurse, pretty); /* Restore the type code so later uses work as intended. */ TYPE_CODE (type) = TYPE_CODE_BOOL; @@ -568,7 +571,7 @@ f_val_print (type, valaddr, address, stream, format, deref_ref, recurse, default: error ("Invalid F77 type code %d in symbol table.", TYPE_CODE (type)); } - fflush (stream); + gdb_flush (stream); return 0; } @@ -758,4 +761,7 @@ _initialize_f_valprint () { add_info ("common", info_common_command, "Print out the values contained in a Fortran COMMON block."); + if (xdb_commands) + add_com("lc", class_info, info_common_command, + "Print out the values contained in a Fortran COMMON block."); } |