aboutsummaryrefslogtreecommitdiff
path: root/gdb/mipsread.c
diff options
context:
space:
mode:
authorPeter Schauer <Peter.Schauer@mytum.de>1993-05-22 07:26:25 +0000
committerPeter Schauer <Peter.Schauer@mytum.de>1993-05-22 07:26:25 +0000
commitac8cf67dcad6b89d3867e8ac45921e94ac84db89 (patch)
tree46e0b8cf6eeb1115a21cab6283e7a7ca9c2725e6 /gdb/mipsread.c
parent43152fe57b27c7dc96624b43e1a9598bb7eb2f04 (diff)
downloadgdb-ac8cf67dcad6b89d3867e8ac45921e94ac84db89.zip
gdb-ac8cf67dcad6b89d3867e8ac45921e94ac84db89.tar.gz
gdb-ac8cf67dcad6b89d3867e8ac45921e94ac84db89.tar.bz2
* config/mips/tm-irix3.h: Clean up, use tm-bigmips.h and redefine
the necessary bits. * findvar.c (value_from_register): Fix uninitialized first_addr which caused problems with assignment of doubles to register variables on some targets. * mipsread.c: Remove TM_FILE_OVERRIDE, include tm.h and provide the missing mips definitions if necessary. Fix handling of double register variables for mips targets and big endian hosts. These patches are from Paul Flinders <ptf@delcam.co.uk>. * config/mips/tm-mips.h: Increase MAX_REGISTER_{RAW,VIRTUAL}_SIZE to 8 bytes for doubles. * config/mips/tm-mips.h (REGISTER_CONVERT_TO_TYPE): New macro for conversion of type held in multiple registers to host format. * config/mips/tm-mips.h (REGISTER_CONVERT_FROM_TYPE): New macro, companion to REGISTER_CONVERT_TO_TYPE. * config/mips/tm-mips.h (EXTRACT_RETURN_VALUE, STORE_RETURN_VALUE): Convert to function calls. * config/mips/tm-mips.h (FIX_CALL_DUMMY): New code for big endian mips targets. * mips-tdep.c (mips_print_register): Raw buffer now needs just MAX_REGISTER_RAW_SIZE bytes. * mips-tdep.c (mips_print_register): Use REGISTER_CONVERT_TO_TYPE (if defined) for doubles. * mips-tdep.c: (mips_extract_return_value, mips_store_return_value): New functions, take care of REGISTER_CONVERT_TO/FROM_TYPE. * valops.c (value_assign): Use REGISTER_CONVERT_TO_TYPE if defined. * findvar.c (value_from_register): Use REGISTER_CONVERT_TO_TYPE if defined.
Diffstat (limited to 'gdb/mipsread.c')
-rw-r--r--gdb/mipsread.c30
1 files changed, 26 insertions, 4 deletions
diff --git a/gdb/mipsread.c b/gdb/mipsread.c
index 4f0558b..039f3a4 100644
--- a/gdb/mipsread.c
+++ b/gdb/mipsread.c
@@ -45,9 +45,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
This module can read all four of the known byte-order combinations,
on any type of host. */
-#define TM_FILE_OVERRIDE
#include "defs.h"
-#include "mips/tm-mips.h"
#include "symtab.h"
#include "gdbtypes.h"
#include "gdbcore.h"
@@ -58,6 +56,25 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#include "stabsread.h"
#include "complaints.h"
+/* These are needed if the tm.h file does not contain the necessary
+ mips specific definitions. */
+
+#ifndef MIPS_EFI_SYMBOL_NAME
+#define MIPS_EFI_SYMBOL_NAME "__GDB_EFI_INFO__"
+#include "coff/sym.h"
+#include "coff/symconst.h"
+typedef struct mips_extra_func_info {
+ long numargs;
+ PDR pdr;
+} *mips_extra_func_info_t;
+#ifndef RA_REGNUM
+#define RA_REGNUM 0
+#endif
+#ifndef FP0_REGNUM
+#define FP0_REGNUM 0
+#endif
+#endif
+
#ifdef USG
#include <sys/types.h>
#define L_SET 0
@@ -415,8 +432,6 @@ mipscoff_psymtab_to_symtab (pst)
printf_filtered ("Reading in symbols for %s...", pst->filename);
fflush (stdout);
}
- /* Get the BFD and list of pending typedefs */
- cur_bfd = CUR_BFD (pst);
next_symbol_text_func = mips_next_symbol_text;
@@ -2392,8 +2407,15 @@ psymtab_to_symtab_1 (pst, filename)
pst->dependencies[i]->filename);
}
+ /* Do nothing if this is a dummy psymtab. */
+
+ if (pst->n_global_syms == 0 && pst->n_static_syms == 0
+ && pst->textlow == 0 && pst->texthigh == 0)
+ return;
+
/* Now read the symbols for this symtab */
+ cur_bfd = CUR_BFD (pst);
current_objfile = pst->objfile;
cur_fd = FDR_IDX (pst);
fh = (cur_fd == -1) ? (FDR *) NULL : ecoff_data (cur_bfd)->fdr + cur_fd;