*** empty log message ***
[deliverable/binutils-gdb.git] / gdb / mips-mdebug-tdep.c
index efb105d7df394b96264c3aa6d2e35e1dc8f26ab9..538e37476a23490da9b90b812c7b46f7093e3bb9 100644 (file)
 #include "frame-unwind.h"
 #include "frame-base.h"
 #include "mips-mdebug-tdep.h"
+#include "mdebugread.h"
 
 #define PROC_LOW_ADDR(proc) ((proc)->pdr.adr)  /* least address */
-#define PROC_HIGH_ADDR(proc) ((proc)->high_addr)       /* upper address bound */
 #define PROC_FRAME_OFFSET(proc) ((proc)->pdr.frameoffset)
 #define PROC_FRAME_REG(proc) ((proc)->pdr.framereg)
-#define PROC_FRAME_ADJUST(proc)  ((proc)->frame_adjust)
 #define PROC_REG_MASK(proc) ((proc)->pdr.regmask)
 #define PROC_FREG_MASK(proc) ((proc)->pdr.fregmask)
 #define PROC_REG_OFFSET(proc) ((proc)->pdr.regoffset)
@@ -77,11 +76,11 @@ compare_pdr_entries (const void *a, const void *b)
 
 static const struct objfile_data *mips_pdr_data;
 
-static mips_extra_func_info_t
+static struct mdebug_extra_func_info *
 non_heuristic_proc_desc (CORE_ADDR pc, CORE_ADDR *addrptr)
 {
   CORE_ADDR startaddr;
-  mips_extra_func_info_t proc_desc;
+  struct mdebug_extra_func_info *proc_desc;
   struct block *b = block_for_pc (pc);
   struct symbol *sym;
   struct obj_section *sec;
@@ -210,19 +209,15 @@ non_heuristic_proc_desc (CORE_ADDR pc, CORE_ADDR *addrptr)
                *addrptr = pdr_pc;
 
              /* Fill in what we need of the proc_desc.  */
-             proc_desc = (mips_extra_func_info_t)
+             proc_desc = (struct mdebug_extra_func_info *)
                obstack_alloc (&sec->objfile->objfile_obstack,
-                              sizeof (struct mips_extra_func_info));
+                              sizeof (struct mdebug_extra_func_info));
              PROC_LOW_ADDR (proc_desc) = pdr_pc;
 
-             /* Only used for dummy frames.  */
-             PROC_HIGH_ADDR (proc_desc) = 0;
-
              PROC_FRAME_OFFSET (proc_desc)
                = bfd_get_32 (sec->objfile->obfd, ptr + 20);
              PROC_FRAME_REG (proc_desc) = bfd_get_32 (sec->objfile->obfd,
                                                       ptr + 24);
-             PROC_FRAME_ADJUST (proc_desc) = 0;
              PROC_REG_MASK (proc_desc) = bfd_get_32 (sec->objfile->obfd,
                                                      ptr + 4);
              PROC_FREG_MASK (proc_desc) = bfd_get_32 (sec->objfile->obfd,
@@ -251,13 +246,13 @@ non_heuristic_proc_desc (CORE_ADDR pc, CORE_ADDR *addrptr)
       return NULL;
     }
 
-  sym = lookup_symbol (MIPS_EFI_SYMBOL_NAME, b, LABEL_DOMAIN, 0, NULL);
+  sym = lookup_symbol (MDEBUG_EFI_SYMBOL_NAME, b, LABEL_DOMAIN, 0, NULL);
 
   /* If we never found a PDR for this function in symbol reading, then
      examine prologues to find the information.  */
   if (sym)
     {
-      proc_desc = (mips_extra_func_info_t) SYMBOL_VALUE (sym);
+      proc_desc = (struct mdebug_extra_func_info *) SYMBOL_VALUE (sym);
       if (PROC_FRAME_REG (proc_desc) == -1)
        return NULL;
       else
@@ -277,7 +272,7 @@ static struct mips_frame_cache *
 mips_mdebug_frame_cache (struct frame_info *next_frame, void **this_cache)
 {
   CORE_ADDR startaddr = 0;
-  mips_extra_func_info_t proc_desc;
+  struct mdebug_extra_func_info *proc_desc;
   struct mips_frame_cache *cache;
   struct gdbarch *gdbarch = get_frame_arch (next_frame);
   struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
@@ -301,7 +296,7 @@ mips_mdebug_frame_cache (struct frame_info *next_frame, void **this_cache)
 
   /* Extract the frame's base.  */
   cache->base = (frame_unwind_register_signed (next_frame, NUM_REGS + PROC_FRAME_REG (proc_desc))
-                + PROC_FRAME_OFFSET (proc_desc) - PROC_FRAME_ADJUST (proc_desc));
+                + PROC_FRAME_OFFSET (proc_desc));
 
   kernel_trap = PROC_REG_MASK (proc_desc) & 1;
   gen_mask = kernel_trap ? 0xFFFFFFFF : PROC_REG_MASK (proc_desc);
@@ -419,7 +414,7 @@ mips_mdebug_frame_sniffer (struct frame_info *next_frame)
 {
   CORE_ADDR pc = frame_pc_unwind (next_frame);
   CORE_ADDR startaddr = 0;
-  mips_extra_func_info_t proc_desc;
+  struct mdebug_extra_func_info *proc_desc;
   int kernel_trap;
 
   /* Don't use this on MIPS16.  */
This page took 0.026488 seconds and 4 git commands to generate.