aboutsummaryrefslogtreecommitdiff
path: root/gdb/f-valprint.c
diff options
context:
space:
mode:
authorDavid Taylor <taylor@redhat.com>1998-12-28 23:06:13 +0000
committerDavid Taylor <taylor@redhat.com>1998-12-28 23:06:13 +0000
commit4ef1f4677390c085543fe80eec41b0fe5d58ddca (patch)
treed0e8320e4871a81733155e8ce653507dd3d64825 /gdb/f-valprint.c
parentd6fdf61c78fbce1dad62cd1022e606fdaaad4202 (diff)
downloadfsf-binutils-gdb-4ef1f4677390c085543fe80eec41b0fe5d58ddca.zip
fsf-binutils-gdb-4ef1f4677390c085543fe80eec41b0fe5d58ddca.tar.gz
fsf-binutils-gdb-4ef1f4677390c085543fe80eec41b0fe5d58ddca.tar.bz2
hp merge changes -- too numerous to mention here; see ChangeLog and
ChangeLog-gdbtk for details.
Diffstat (limited to 'gdb/f-valprint.c')
-rw-r--r--gdb/f-valprint.c26
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.");
}