diff options
-rw-r--r-- | gdb/ChangeLog | 12 | ||||
-rw-r--r-- | gdb/alpha-mdebug-tdep.c | 2 | ||||
-rw-r--r-- | gdb/config/alpha/tm-alpha.h | 20 | ||||
-rw-r--r-- | gdb/config/mips/tm-mips.h | 17 | ||||
-rw-r--r-- | gdb/mdebugread.c | 49 | ||||
-rw-r--r-- | gdb/mips-mdebug-tdep.c | 16 | ||||
-rw-r--r-- | gdb/mips-tdep.c | 6 | ||||
-rw-r--r-- | gdb/objfiles.c | 5 |
8 files changed, 64 insertions, 63 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 25bfdd64c15..ba592746866 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -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. diff --git a/gdb/alpha-mdebug-tdep.c b/gdb/alpha-mdebug-tdep.c index 153ed11ce7d..ea8eeead894 100644 --- a/gdb/alpha-mdebug-tdep.c +++ b/gdb/alpha-mdebug-tdep.c @@ -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) diff --git a/gdb/config/alpha/tm-alpha.h b/gdb/config/alpha/tm-alpha.h index d21ef1d648d..c481ec2c07d 100644 --- a/gdb/config/alpha/tm-alpha.h +++ b/gdb/config/alpha/tm-alpha.h @@ -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 */ diff --git a/gdb/config/mips/tm-mips.h b/gdb/config/mips/tm-mips.h index 40f2fd1d278..fb73bf56866 100644 --- a/gdb/config/mips/tm-mips.h +++ b/gdb/config/mips/tm-mips.h @@ -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) diff --git a/gdb/mdebugread.c b/gdb/mdebugread.c index 49c2497fe38..a930dbe8bee 100644 --- a/gdb/mdebugread.c +++ b/gdb/mdebugread.c @@ -60,17 +60,16 @@ /* 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 (¤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; @@ -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 (¤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; diff --git a/gdb/mips-mdebug-tdep.c b/gdb/mips-mdebug-tdep.c index b7d9545074f..b13cba4e79f 100644 --- a/gdb/mips-mdebug-tdep.c +++ b/gdb/mips-mdebug-tdep.c @@ -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. */ diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c index fca688203b1..1d96f01b4ea 100644 --- a/gdb/mips-tdep.c +++ b/gdb/mips-tdep.c @@ -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. */ @@ -5282,8 +5282,6 @@ mips_dump_tdep (struct gdbarch *current_gdbarch, struct ui_file *file) #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, MIPS_LAST_ARG_REGNUM - MIPS_A0_REGNUM + 1); diff --git a/gdb/objfiles.c b/gdb/objfiles.c index 3c4e0b402b0..a4aa652f258 100644 --- a/gdb/objfiles.c +++ b/gdb/objfiles.c @@ -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 |