* Rename remote-es1800.c to remote-es.c
[deliverable/binutils-gdb.git] / gdb / mipsread.c
index 4f0558b8106bed03846a49aae7113a58e39a4ce2..294f923e612133453abb71da1c330105217f1243 100644 (file)
@@ -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;
@@ -3131,19 +3153,20 @@ fixup_sigtramp ()
 
   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)
This page took 0.024183 seconds and 4 git commands to generate.