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"
#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
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;
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;
sigtramp_address = -1;
- /* We know it is sold as sigvec */
+ /* We have to handle the following cases here:
+ a) The Mips library has a sigtramp label within sigvec.
+ b) Irix has a _sigtramp which we want to use, but it also has sigvec. */
s = lookup_symbol ("sigvec", 0, VAR_NAMESPACE, 0, NULL);
-
- /* Most programs do not play with signals */
- if (s == 0)
- s = lookup_symbol ("_sigtramp", 0, VAR_NAMESPACE, 0, NULL);
- else
+ if (s != 0)
{
b0 = SYMBOL_BLOCK_VALUE (s);
-
- /* A label of sigvec, to be more precise */
s = lookup_symbol ("sigtramp", b0, VAR_NAMESPACE, 0, NULL);
}
+ if (s == 0)
+ {
+ /* No sigvec or no sigtramp inside sigvec, try _sigtramp. */
+ s = lookup_symbol ("_sigtramp", 0, VAR_NAMESPACE, 0, NULL);
+ }
/* But maybe this program uses its own version of sigvec */
if (s == 0)