aboutsummaryrefslogtreecommitdiff
path: root/gdb/f-lang.c
diff options
context:
space:
mode:
authorFred Fish <fnf@specifix.com>1996-07-26 03:01:51 +0000
committerFred Fish <fnf@specifix.com>1996-07-26 03:01:51 +0000
commitb607efe7149f91512dc5fd9dbfc4c6156cdf9a93 (patch)
treeb90b82aac0d802ec179525d8d80635a44c562f1e /gdb/f-lang.c
parentdc88c64e2c0dbc786d0cee2b3bde0bdee8fcf2d1 (diff)
downloadgdb-b607efe7149f91512dc5fd9dbfc4c6156cdf9a93.zip
gdb-b607efe7149f91512dc5fd9dbfc4c6156cdf9a93.tar.gz
gdb-b607efe7149f91512dc5fd9dbfc4c6156cdf9a93.tar.bz2
See gdb ChangeLog entry with header:
Thu Jul 25 19:41:31 1996 Fred Fish <fnf@cygnus.com> for a rather huge set of changes. I was going to put them here, but it made cvs dump core. :-(
Diffstat (limited to 'gdb/f-lang.c')
-rw-r--r--gdb/f-lang.c132
1 files changed, 81 insertions, 51 deletions
diff --git a/gdb/f-lang.c b/gdb/f-lang.c
index 57a6809..976211e 100644
--- a/gdb/f-lang.c
+++ b/gdb/f-lang.c
@@ -45,6 +45,47 @@ struct type *builtin_type_f_complex_s16;
struct type *builtin_type_f_complex_s32;
struct type *builtin_type_f_void;
+/* Following is dubious stuff that had been in the xcoff reader. */
+
+struct saved_fcn
+{
+ long line_offset; /* Line offset for function */
+ struct saved_fcn *next;
+};
+
+
+struct saved_bf_symnum
+{
+ long symnum_fcn; /* Symnum of function (i.e. .function directive) */
+ long symnum_bf; /* Symnum of .bf for this function */
+ struct saved_bf_symnum *next;
+};
+
+typedef struct saved_fcn SAVED_FUNCTION, *SAVED_FUNCTION_PTR;
+typedef struct saved_bf_symnum SAVED_BF, *SAVED_BF_PTR;
+
+/* Local functions */
+
+#if 0
+static void clear_function_list PARAMS ((void));
+static long get_bf_for_fcn PARAMS ((long));
+static void clear_bf_list PARAMS ((void));
+static void patch_all_commons_by_name PARAMS ((char *, CORE_ADDR, int));
+static SAVED_F77_COMMON_PTR find_first_common_named PARAMS ((char *));
+static void add_common_entry PARAMS ((struct symbol *));
+static void add_common_block PARAMS ((char *, CORE_ADDR, int, char *));
+static SAVED_FUNCTION *allocate_saved_function_node PARAMS ((void));
+static SAVED_BF_PTR allocate_saved_bf_node PARAMS ((void));
+static COMMON_ENTRY_PTR allocate_common_entry_node PARAMS ((void));
+static SAVED_F77_COMMON_PTR allocate_saved_f77_common_node PARAMS ((void));
+#endif
+
+static void patch_common_entries PARAMS ((SAVED_F77_COMMON_PTR, CORE_ADDR, int));
+static struct type *f_create_fundamental_type PARAMS ((struct objfile *, int));
+static void f_printstr PARAMS ((FILE *, char *, unsigned int, int));
+static void f_printchar PARAMS ((int, FILE *));
+static void emit_char PARAMS ((int, FILE *, int));
+
/* Print the character C on STREAM as part of the contents of a literal
string whose delimiter is QUOTER. Note that that format for printing
characters and strings is language specific.
@@ -413,7 +454,10 @@ struct type ** const (f_builtin_types[]) =
0
};
-int c_value_print();
+/* This is declared in c-lang.h but it is silly to import that file for what
+ is already just a hack. */
+extern int
+c_value_print PARAMS ((struct value *, GDB_FILE *, int, enum val_prettyprint));
const struct language_defn f_language_defn = {
"fortran",
@@ -523,27 +567,9 @@ _initialize_f_language ()
add_language (&f_language_defn);
}
-/* Following is dubious stuff that had been in the xcoff reader. */
-
-struct saved_fcn
-{
- long line_offset; /* Line offset for function */
- struct saved_fcn *next;
-};
-
-
-struct saved_bf_symnum
-{
- long symnum_fcn; /* Symnum of function (i.e. .function directive) */
- long symnum_bf; /* Symnum of .bf for this function */
- struct saved_bf_symnum *next;
-};
-
-typedef struct saved_fcn SAVED_FUNCTION, *SAVED_FUNCTION_PTR;
-typedef struct saved_bf_symnum SAVED_BF, *SAVED_BF_PTR;
-
-
-SAVED_BF_PTR allocate_saved_bf_node()
+#if 0
+static SAVED_BF_PTR
+allocate_saved_bf_node()
{
SAVED_BF_PTR new;
@@ -551,7 +577,8 @@ SAVED_BF_PTR allocate_saved_bf_node()
return(new);
}
-SAVED_FUNCTION *allocate_saved_function_node()
+static SAVED_FUNCTION *
+allocate_saved_function_node()
{
SAVED_FUNCTION *new;
@@ -559,7 +586,7 @@ SAVED_FUNCTION *allocate_saved_function_node()
return(new);
}
-SAVED_F77_COMMON_PTR allocate_saved_f77_common_node()
+static SAVED_F77_COMMON_PTR allocate_saved_f77_common_node()
{
SAVED_F77_COMMON_PTR new;
@@ -567,41 +594,38 @@ SAVED_F77_COMMON_PTR allocate_saved_f77_common_node()
return(new);
}
-COMMON_ENTRY_PTR allocate_common_entry_node()
+static COMMON_ENTRY_PTR allocate_common_entry_node()
{
COMMON_ENTRY_PTR new;
new = (COMMON_ENTRY_PTR) xmalloc (sizeof (COMMON_ENTRY));
return(new);
}
-
+#endif
SAVED_F77_COMMON_PTR head_common_list=NULL; /* Ptr to 1st saved COMMON */
SAVED_F77_COMMON_PTR tail_common_list=NULL; /* Ptr to last saved COMMON */
SAVED_F77_COMMON_PTR current_common=NULL; /* Ptr to current COMMON */
+#if 0
static SAVED_BF_PTR saved_bf_list=NULL; /* Ptr to (.bf,function)
list*/
-#if 0
static SAVED_BF_PTR saved_bf_list_end=NULL; /* Ptr to above list's end */
-#endif
static SAVED_BF_PTR current_head_bf_list=NULL; /* Current head of above list
*/
-#if 0
static SAVED_BF_PTR tmp_bf_ptr; /* Generic temporary for use
in macros */
-#endif
/* The following function simply enters a given common block onto
the global common block chain */
-void add_common_block(name,offset,secnum,func_stab)
+static void
+add_common_block(name,offset,secnum,func_stab)
char *name;
CORE_ADDR offset;
int secnum;
char *func_stab;
-
{
SAVED_F77_COMMON_PTR tmp;
char *c,*local_copy_func_stab;
@@ -662,14 +686,15 @@ void add_common_block(name,offset,secnum,func_stab)
tail_common_list->next = tmp;
tail_common_list = tmp;
}
-
}
-
+#endif
/* The following function simply enters a given common entry onto
the "current_common" block that has been saved away. */
-void add_common_entry(entry_sym_ptr)
+#if 0
+static void
+add_common_entry(entry_sym_ptr)
struct symbol *entry_sym_ptr;
{
COMMON_ENTRY_PTR tmp;
@@ -700,13 +725,14 @@ void add_common_entry(entry_sym_ptr)
current_common->end_of_entries = tmp;
}
}
-
-
}
+#endif
/* This routine finds the first encountred COMMON block named "name" */
-SAVED_F77_COMMON_PTR find_first_common_named(name)
+#if 0
+static SAVED_F77_COMMON_PTR
+find_first_common_named(name)
char *name;
{
@@ -723,6 +749,7 @@ SAVED_F77_COMMON_PTR find_first_common_named(name)
}
return(NULL);
}
+#endif
/* This routine finds the first encountred COMMON block named "name"
that belongs to function funcname */
@@ -754,7 +781,8 @@ SAVED_F77_COMMON_PTR find_common_for_function(name, funcname)
"name." */
-void patch_common_entries (blk, offset, secnum)
+static void
+patch_common_entries (blk, offset, secnum)
SAVED_F77_COMMON_PTR blk;
CORE_ADDR offset;
int secnum;
@@ -782,8 +810,9 @@ void patch_common_entries (blk, offset, secnum)
hashed-lookup. Secnum is the section number for the .bss section
(which is where common data lives). */
-
-void patch_all_commons_by_name (name, offset, secnum)
+#if 0
+static void
+patch_all_commons_by_name (name, offset, secnum)
char *name;
CORE_ADDR offset;
int secnum;
@@ -812,12 +841,8 @@ void patch_all_commons_by_name (name, offset, secnum)
tmp = tmp->next;
}
-
}
-
-
-
-
+#endif
/* This macro adds the symbol-number for the start of the function
(the symbol number of the .bf) referenced by symnum_fcn to a
@@ -856,7 +881,8 @@ else \
/* This function frees the entire (.bf,function) list */
-void
+#if 0
+static void
clear_bf_list()
{
@@ -871,10 +897,13 @@ void
}
saved_bf_list = NULL;
}
+#endif
int global_remote_debug;
-long
+#if 0
+
+static long
get_bf_for_fcn (the_function)
long the_function;
{
@@ -924,11 +953,10 @@ get_bf_for_fcn (the_function)
}
static SAVED_FUNCTION_PTR saved_function_list=NULL;
-#if 0 /* Currently unused */
static SAVED_FUNCTION_PTR saved_function_list_end=NULL;
-#endif
-void clear_function_list()
+static void
+clear_function_list()
{
SAVED_FUNCTION_PTR tmp = saved_function_list;
SAVED_FUNCTION_PTR next = NULL;
@@ -942,3 +970,5 @@ void clear_function_list()
saved_function_list = NULL;
}
+#endif
+