2004-10-30 Andrew Cagney <cagney@gnu.org>
authorAndrew Cagney <cagney@redhat.com>
Sun, 31 Oct 2004 02:59:21 +0000 (02:59 +0000)
committerAndrew Cagney <cagney@redhat.com>
Sun, 31 Oct 2004 02:59:21 +0000 (02:59 +0000)
* config/alpha/tm-alpha.h (MDEBUG_EFI_SYMBOL_NAME): Rename
MIPS_EFI_SYMBOL_NAME.
(mips_extra_func_info_t, mips_extra_func_info): Delete.
(struct mdebug_extra_func_info): Replace struct
alpha_extra_func_info and alpha_extra_func_info_t.
* config/mips/tm-mips.h (MDEBUG_EFI_SYMBOL_NAME): Rename
MIPS_EFI_SYMBOL_NAME.
(struct mdebug_extra_func_info): Replace struct
alpha_extra_func_info and alpha_extra_func_info_t.
* objfiles.c, mips-tdep.c, mips-mdebug-tdep.c: Update.
* mdebugread.c, alpha-mdebug-tdep.c:

gdb/ChangeLog
gdb/alpha-mdebug-tdep.c
gdb/config/alpha/tm-alpha.h
gdb/config/mips/tm-mips.h
gdb/mdebugread.c
gdb/mips-mdebug-tdep.c
gdb/mips-tdep.c
gdb/objfiles.c

index 25bfdd64c15f636e4edc458995260cd9b4165056..ba592746866d529798ef26ad4e03ee27e0638ade 100644 (file)
@@ -1,5 +1,17 @@
 2004-10-30  Andrew Cagney  <cagney@gnu.org>
 
+       * config/alpha/tm-alpha.h (MDEBUG_EFI_SYMBOL_NAME): Rename
+       MIPS_EFI_SYMBOL_NAME.
+       (mips_extra_func_info_t, mips_extra_func_info): Delete.
+       (struct mdebug_extra_func_info): Replace struct
+       alpha_extra_func_info and alpha_extra_func_info_t.
+       * config/mips/tm-mips.h (MDEBUG_EFI_SYMBOL_NAME): Rename
+       MIPS_EFI_SYMBOL_NAME.
+       (struct mdebug_extra_func_info): Replace struct
+       alpha_extra_func_info and alpha_extra_func_info_t.
+       * objfiles.c, mips-tdep.c, mips-mdebug-tdep.c: Update.
+       * mdebugread.c, alpha-mdebug-tdep.c: 
+
        Suggested by Mark Kettenis.
        * config/mips/tm-mips.h (struct mips_extra_func_info): Delete
        fields frame_adjust and high_addr.
index 153ed11ce7d212eaf6e49211c355228e4204dcae..ea8eeead89449f2103b3163de49c2e2728f2a412 100644 (file)
@@ -108,7 +108,7 @@ find_proc_desc (CORE_ADDR pc)
           symbol reading.  */
        sym = NULL;
       else
-       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 (sym)
index d21ef1d648debec766357dfd7f8fbef137315bfc..c481ec2c07d5ae1683fd689dcf1d319f1536903f 100644 (file)
@@ -34,7 +34,7 @@ struct symbol;
 /* Special symbol found in blocks associated with routines.  We can hang
    alpha_extra_func_info_t's off of this.  */
 
-#define MIPS_EFI_SYMBOL_NAME "__GDB_EFI_INFO__"
+#define MDEBUG_EFI_SYMBOL_NAME "__GDB_EFI_INFO__"
 extern void ecoff_relocate_efi (struct symbol *, CORE_ADDR);
 
 #define RA_REGNUM 26           /* XXXJRT needed by mdebugread.c */
@@ -43,18 +43,10 @@ extern void ecoff_relocate_efi (struct symbol *, CORE_ADDR);
    This overlays the ALPHA's PDR records, 
    alpharead.c (ab)uses this to save memory */
 
-typedef struct alpha_extra_func_info
-  {
-    long numargs;              /* number of args to procedure (was iopt) */
-    PDR pdr;                   /* Procedure descriptor record */
-  }
- *alpha_extra_func_info_t;
-
-/* Define the extra_func_info that mipsread.c needs.
-   FIXME: We should define our own PDR interface, perhaps in a separate
-   header file. This would get rid of the <bfd.h> inclusion in all sources
-   and would abstract the mips/alpha interface from ecoff.  */
-#define mips_extra_func_info alpha_extra_func_info
-#define mips_extra_func_info_t alpha_extra_func_info_t
+struct mdebug_extra_func_info
+{
+  long numargs;                /* number of args to procedure (was iopt) */
+  PDR pdr;                     /* Procedure descriptor record */
+};
 
 #endif /* TM_ALPHA_H */
index 40f2fd1d278446abc1da451457fce4c82835da8e..fb73bf56866d498505ac3bffbed6db2537f29b11 100644 (file)
@@ -45,22 +45,21 @@ extern int mips_step_skips_delay (CORE_ADDR);
 
 #define RA_REGNUM 31           /* Contains return address value */
 
-/* Special symbol found in blocks associated with routines.  We can hang
-   mips_extra_func_info_t's off of this.  */
+/* Special symbol found in blocks associated with routines.  We can
+   hang mdebug_extra_func_info's off of this.  */
 
-#define MIPS_EFI_SYMBOL_NAME "__GDB_EFI_INFO__"
+#define MDEBUG_EFI_SYMBOL_NAME "__GDB_EFI_INFO__"
 extern void ecoff_relocate_efi (struct symbol *, CORE_ADDR);
 
 /* Specific information about a procedure.
    This overlays the MIPS's PDR records, 
    mipsread.c (ab)uses this to save memory */
 
-typedef struct mips_extra_func_info
-  {
-    long numargs;              /* number of args to procedure (was iopt) */
-    PDR pdr;                   /* Procedure descriptor record */
-  }
- *mips_extra_func_info_t;
+struct mdebug_extra_func_info
+{
+  long numargs;                /* number of args to procedure (was iopt) */
+  PDR pdr;                     /* Procedure descriptor record */
+};
 
 /* Functions for dealing with MIPS16 call and return stubs.  */
 #define DEPRECATED_IGNORE_HELPER_CALL(pc)                      mips_ignore_helper (pc)
index 49c2497fe3822c0f31dbbe5ffc63744356deeda4..a930dbe8bee468760d5e1a36e4da9a16175bdb33 100644 (file)
 /* 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__"
+#ifndef MDEBUG_EFI_SYMBOL_NAME
+#define MDEBUG_EFI_SYMBOL_NAME "__GDB_EFI_INFO__"
 extern void ecoff_relocate_efi (struct symbol *, CORE_ADDR);
 #include "coff/sym.h"
 #include "coff/symconst.h"
-typedef struct mips_extra_func_info
-  {
-    long numargs;
-    PDR pdr;
-  }
- *mips_extra_func_info_t;
+struct mdebug_extra_func_info
+{
+  long numargs;
+  PDR pdr;
+};
 #ifndef RA_REGNUM
 #define RA_REGNUM 0
 #endif
@@ -1181,7 +1180,7 @@ parse_symbol (SYMR *sh, union aux_ext *ax, char *ext_sh, int bigend,
        {
          /* Finished with procedure */
          struct blockvector *bv = BLOCKVECTOR (top_stack->cur_st);
-         struct mips_extra_func_info *e;
+         struct mdebug_extra_func_info *e;
          struct block *b = top_stack->cur_block;
          struct type *ftype = top_stack->cur_type;
          int i;
@@ -1189,14 +1188,14 @@ parse_symbol (SYMR *sh, union aux_ext *ax, char *ext_sh, int bigend,
          BLOCK_END (top_stack->cur_block) += sh->value;        /* size */
 
          /* Make up special symbol to contain procedure specific info */
-         s = new_symbol (MIPS_EFI_SYMBOL_NAME);
+         s = new_symbol (MDEBUG_EFI_SYMBOL_NAME);
          SYMBOL_DOMAIN (s) = LABEL_DOMAIN;
          SYMBOL_CLASS (s) = LOC_CONST;
          SYMBOL_TYPE (s) = mdebug_type_void;
-         e = ((struct mips_extra_func_info *)
+         e = ((struct mdebug_extra_func_info *)
               obstack_alloc (&current_objfile->objfile_obstack,
-                             sizeof (struct mips_extra_func_info)));
-         memset (e, 0, sizeof (struct mips_extra_func_info));
+                             sizeof (struct mdebug_extra_func_info)));
+         memset (e, 0, sizeof (struct mdebug_extra_func_info));
          SYMBOL_VALUE (s) = (long) e;
          e->numargs = top_stack->numargs;
          e->pdr.framereg = -1;
@@ -1846,13 +1845,13 @@ upgrade_type (int fd, struct type **tpp, int tq, union aux_ext *ax, int bigend,
 
 /* Parse a procedure descriptor record PR.  Note that the procedure is
    parsed _after_ the local symbols, now we just insert the extra
-   information we need into a MIPS_EFI_SYMBOL_NAME symbol that has
+   information we need into a MDEBUG_EFI_SYMBOL_NAME symbol that has
    already been placed in the procedure's main block.  Note also that
    images that have been partially stripped (ld -x) have been deprived
    of local symbols, and we have to cope with them here.  FIRST_OFF is
    the offset of the first procedure for this FDR; we adjust the
    address by this amount, but I don't know why.  SEARCH_SYMTAB is the symtab
-   to look for the function which contains the MIPS_EFI_SYMBOL_NAME symbol
+   to look for the function which contains the MDEBUG_EFI_SYMBOL_NAME symbol
    in question, or NULL to use top_stack->cur_block.  */
 
 static void parse_procedure (PDR *, struct symtab *, struct partial_symtab *);
@@ -1863,7 +1862,7 @@ parse_procedure (PDR *pr, struct symtab *search_symtab,
 {
   struct symbol *s, *i;
   struct block *b;
-  struct mips_extra_func_info *e;
+  struct mdebug_extra_func_info *e;
   char *sh_name;
 
   /* Simple rule to find files linked "-x" */
@@ -1959,11 +1958,11 @@ parse_procedure (PDR *pr, struct symtab *search_symtab,
 #endif
     }
 
-  i = mylookup_symbol (MIPS_EFI_SYMBOL_NAME, b, LABEL_DOMAIN, LOC_CONST);
+  i = mylookup_symbol (MDEBUG_EFI_SYMBOL_NAME, b, LABEL_DOMAIN, LOC_CONST);
 
   if (i)
     {
-      e = (struct mips_extra_func_info *) SYMBOL_VALUE (i);
+      e = (struct mdebug_extra_func_info *) SYMBOL_VALUE (i);
       e->pdr = *pr;
       e->pdr.isym = (long) s;
 
@@ -2017,9 +2016,9 @@ parse_procedure (PDR *pr, struct symtab *search_symtab,
 void
 ecoff_relocate_efi (struct symbol *sym, CORE_ADDR delta)
 {
-  struct mips_extra_func_info *e;
+  struct mdebug_extra_func_info *e;
 
-  e = (struct mips_extra_func_info *) SYMBOL_VALUE (sym);
+  e = (struct mdebug_extra_func_info *) SYMBOL_VALUE (sym);
 
   e->pdr.adr += delta;
 }
@@ -3929,13 +3928,13 @@ psymtab_to_symtab_1 (struct partial_symtab *pst, char *filename)
                {
                  /* Make up special symbol to contain
                     procedure specific info */
-                 struct mips_extra_func_info *e =
-                 ((struct mips_extra_func_info *)
+                 struct mdebug_extra_func_info *e =
+                 ((struct mdebug_extra_func_info *)
                   obstack_alloc (&current_objfile->objfile_obstack,
-                                 sizeof (struct mips_extra_func_info)));
-                 struct symbol *s = new_symbol (MIPS_EFI_SYMBOL_NAME);
+                                 sizeof (struct mdebug_extra_func_info)));
+                 struct symbol *s = new_symbol (MDEBUG_EFI_SYMBOL_NAME);
 
-                 memset (e, 0, sizeof (struct mips_extra_func_info));
+                 memset (e, 0, sizeof (struct mdebug_extra_func_info));
                  SYMBOL_DOMAIN (s) = LABEL_DOMAIN;
                  SYMBOL_CLASS (s) = LOC_CONST;
                  SYMBOL_TYPE (s) = mdebug_type_void;
index b7d9545074f1b60c98b84688df97fc99ac90156d..b13cba4e79fcc48e4d5802ce49cd6e7c59fc7bc9 100644 (file)
@@ -75,11 +75,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;
@@ -208,9 +208,9 @@ 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;
 
              PROC_FRAME_OFFSET (proc_desc)
@@ -245,13 +245,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
@@ -271,7 +271,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);
@@ -413,7 +413,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.  */
index fca688203b1697ea26653f200ea9ca2f349dccc6..1d96f01b4eabaa292c30c3cbca599123dca94139 100644 (file)
@@ -88,7 +88,7 @@ static const char *mips_abi_strings[] = {
 
 struct frame_extra_info
 {
-  mips_extra_func_info_t proc_desc;
+  struct mdebug_extra_func_info *proc_desc;
   int num_args;
 };
 
@@ -2204,7 +2204,7 @@ mips_software_single_step (enum target_signal sig, int insert_breakpoints_p)
     target_remove_breakpoint (next_pc, break_mem);
 }
 
-static struct mips_extra_func_info temp_proc_desc;
+static struct mdebug_extra_func_info temp_proc_desc;
 
 /* Test whether the PC points to the return instruction at the
    end of a function. */
@@ -5281,8 +5281,6 @@ mips_dump_tdep (struct gdbarch *current_gdbarch, struct ui_file *file)
                      MACHINE_CPROC_SP_OFFSET);
 #endif
   fprintf_unfiltered (file, "mips_dump_tdep: MIPS_DEFAULT_ABI = FIXME!\n");
-  fprintf_unfiltered (file,
-                     "mips_dump_tdep: MIPS_EFI_SYMBOL_NAME = multi-arch!!\n");
   fprintf_unfiltered (file,
                      "mips_dump_tdep: MIPS_LAST_ARG_REGNUM = %d (%d regs)\n",
                      MIPS_LAST_ARG_REGNUM,
index 3c4e0b402b0ec3fa94b03a3ef6d290a7f0e3f1f8..a4aa652f2581c2dc39203c863566b5b7bdbcffab 100644 (file)
@@ -555,12 +555,13 @@ objfile_relocate (struct objfile *objfile, struct section_offsets *new_offsets)
                  SYMBOL_VALUE_ADDRESS (sym) +=
                    ANOFFSET (delta, SYMBOL_SECTION (sym));
                }
-#ifdef MIPS_EFI_SYMBOL_NAME
+#ifdef MDEBUG_EFI_SYMBOL_NAME
              /* Relocate Extra Function Info for ecoff.  */
 
              else if (SYMBOL_CLASS (sym) == LOC_CONST
                       && SYMBOL_DOMAIN (sym) == LABEL_DOMAIN
-                      && strcmp (DEPRECATED_SYMBOL_NAME (sym), MIPS_EFI_SYMBOL_NAME) == 0)
+                      && strcmp (DEPRECATED_SYMBOL_NAME (sym),
+                                 MDEBUG_EFI_SYMBOL_NAME) == 0)
                ecoff_relocate_efi (sym, ANOFFSET (delta,
                                                   s->block_line_section));
 #endif