This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[commit] s/mips_/mdebug_/
- From: Andrew Cagney <cagney at gnu dot org>
- To: gdb-patches at sources dot redhat dot com
- Date: Sat, 30 Oct 2004 22:03:13 -0400
- Subject: [commit] s/mips_/mdebug_/
Both tm-mips.h and tm-alpha.h define the poorly named
MIPS_EFI_SYMBOL_NAME and mips_extra_func_info. This renames them,
replacing MIPS with MDEBUG (since that's what uses it).
committed,
Andrew
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:
Index: alpha-mdebug-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/alpha-mdebug-tdep.c,v
retrieving revision 1.7
diff -p -u -r1.7 alpha-mdebug-tdep.c
--- alpha-mdebug-tdep.c 16 Jul 2003 22:29:13 -0000 1.7
+++ alpha-mdebug-tdep.c 31 Oct 2004 02:57:38 -0000
@@ -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: mdebugread.c
===================================================================
RCS file: /cvs/src/src/gdb/mdebugread.c,v
retrieving revision 1.65
diff -p -u -r1.65 mdebugread.c
--- mdebugread.c 23 Oct 2004 16:18:09 -0000 1.65
+++ mdebugread.c 31 Oct 2004 02:57:39 -0000
@@ -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 *a
{
/* 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 *a
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,
/* 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
{
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
#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
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_symt
{
/* 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;
Index: mips-mdebug-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/mips-mdebug-tdep.c,v
retrieving revision 1.2
diff -p -u -r1.2 mips-mdebug-tdep.c
--- mips-mdebug-tdep.c 31 Oct 2004 00:07:29 -0000 1.2
+++ mips-mdebug-tdep.c 31 Oct 2004 02:57:39 -0000
@@ -75,11 +75,11 @@ compare_pdr_entries (const void *a, cons
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, C
*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, C
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_
{
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: mips-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/mips-tdep.c,v
retrieving revision 1.355
diff -p -u -r1.355 mips-tdep.c
--- mips-tdep.c 30 Oct 2004 23:22:53 -0000 1.355
+++ mips-tdep.c 31 Oct 2004 02:57:40 -0000
@@ -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_s
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_
#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);
Index: objfiles.c
===================================================================
RCS file: /cvs/src/src/gdb/objfiles.c,v
retrieving revision 1.56
diff -p -u -r1.56 objfiles.c
--- objfiles.c 30 Sep 2004 19:57:54 -0000 1.56
+++ objfiles.c 31 Oct 2004 02:57:40 -0000
@@ -555,12 +555,13 @@ objfile_relocate (struct objfile *objfil
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
Index: config/alpha/tm-alpha.h
===================================================================
RCS file: /cvs/src/src/gdb/config/alpha/tm-alpha.h,v
retrieving revision 1.30
diff -p -u -r1.30 tm-alpha.h
--- config/alpha/tm-alpha.h 30 Oct 2004 21:16:10 -0000 1.30
+++ config/alpha/tm-alpha.h 31 Oct 2004 02:57:40 -0000
@@ -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 s
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: config/mips/tm-mips.h
===================================================================
RCS file: /cvs/src/src/gdb/config/mips/tm-mips.h,v
retrieving revision 1.71
diff -p -u -r1.71 tm-mips.h
--- config/mips/tm-mips.h 31 Oct 2004 00:07:29 -0000 1.71
+++ config/mips/tm-mips.h 31 Oct 2004 02:57:40 -0000
@@ -45,22 +45,21 @@ extern int mips_step_skips_delay (CORE_A
#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)