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.
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)
/* 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 */
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 */
#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)
/* 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
{
/* 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;
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 (¤t_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;
/* 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 *);
{
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" */
#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;
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;
}
{
/* 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 (¤t_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;
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;
*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)
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
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);
{
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. */
struct frame_extra_info
{
- mips_extra_func_info_t proc_desc;
+ struct mdebug_extra_func_info *proc_desc;
int num_args;
};
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. */
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,
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