aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2004-05-01 00:34:55 +0000
committerAndrew Cagney <cagney@redhat.com>2004-05-01 00:34:55 +0000
commit36710c632ceea0a828b1084bb5faaa224910f22f (patch)
tree32ebed3e9533658eff763144f50d49ffd8647e5f /gdb
parent2593d1cdadf3f447af2054c81eb1d0ae90bc8d6d (diff)
downloadgdb-36710c632ceea0a828b1084bb5faaa224910f22f.zip
gdb-36710c632ceea0a828b1084bb5faaa224910f22f.tar.gz
gdb-36710c632ceea0a828b1084bb5faaa224910f22f.tar.bz2
2004-04-30 Andrew Cagney <cagney@redhat.com>
* mips-tdep.c (mips_pc_in_sigtramp): Delete. (mips_gdbarch_init): Do not set pc_in_sigtramp. * mipsread.c (sigtramp_address): Delete extern variable. (mipscoff_new_init): Delete reference. * mdebugread.c (sigtramp_address, sigtramp_end): Delete variables. (fixup_sigtramp): Delete function. * config/mips/tm-mips.h (sigtramp_address, sigtramp_end) (fixup_sigtramp): Delete declarations.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog9
-rw-r--r--gdb/config/mips/tm-mips.h4
-rw-r--r--gdb/mdebugread.c124
-rw-r--r--gdb/mips-tdep.c11
-rw-r--r--gdb/mipsread.c3
5 files changed, 9 insertions, 142 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index d2cf99c..7c0ae2b 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,14 @@
2004-04-30 Andrew Cagney <cagney@redhat.com>
+ * mips-tdep.c (mips_pc_in_sigtramp): Delete.
+ (mips_gdbarch_init): Do not set pc_in_sigtramp.
+ * mipsread.c (sigtramp_address): Delete extern variable.
+ (mipscoff_new_init): Delete reference.
+ * mdebugread.c (sigtramp_address, sigtramp_end): Delete variables.
+ (fixup_sigtramp): Delete function.
+ * config/mips/tm-mips.h (sigtramp_address, sigtramp_end)
+ (fixup_sigtramp): Delete declarations.
+
* ppcnbsd-tdep.c (ppcnbsd_init_abi): Do not set
deprecated_pc_in_sigtramp.
(ppcnbsd_pc_in_sigtramp): Delete function.
diff --git a/gdb/config/mips/tm-mips.h b/gdb/config/mips/tm-mips.h
index be0d6b7..9345068 100644
--- a/gdb/config/mips/tm-mips.h
+++ b/gdb/config/mips/tm-mips.h
@@ -99,10 +99,6 @@ typedef struct mips_extra_func_info
#define SETUP_ARBITRARY_FRAME(argc, argv) setup_arbitrary_frame (argc, argv)
extern struct frame_info *setup_arbitrary_frame (int, CORE_ADDR *);
-/* These are defined in mdebugread.c and are used in mips-tdep.c */
-extern CORE_ADDR sigtramp_address, sigtramp_end;
-extern void fixup_sigtramp (void);
-
/* Functions for dealing with MIPS16 call and return stubs. */
#define IGNORE_HELPER_CALL(pc) mips_ignore_helper (pc)
extern int mips_ignore_helper (CORE_ADDR pc);
diff --git a/gdb/mdebugread.c b/gdb/mdebugread.c
index 89d0282..f00cce4 100644
--- a/gdb/mdebugread.c
+++ b/gdb/mdebugread.c
@@ -321,10 +321,6 @@ static void handle_psymbol_enumerators (struct objfile *, FDR *, int,
static char *mdebug_next_symbol_text (struct objfile *);
-/* Address bounds for the signal trampoline in inferior, if any */
-
-CORE_ADDR sigtramp_address, sigtramp_end;
-
/* Allocate zeroed memory */
static void *
@@ -4751,126 +4747,6 @@ elfmdebug_build_psymtabs (struct objfile *objfile,
install_minimal_symbols (objfile);
do_cleanups (back_to);
}
-
-
-/* Things used for calling functions in the inferior.
- These functions are exported to our companion
- mips-tdep.c file and are here because they play
- with the symbol-table explicitly. */
-
-/* Sigtramp: make sure we have all the necessary information
- about the signal trampoline code. Since the official code
- from MIPS does not do so, we make up that information ourselves.
- If they fix the library (unlikely) this code will neutralize itself. */
-
-/* FIXME: This function is called only by mips-tdep.c. It needs to be
- here because it calls functions defined in this file, but perhaps
- this could be handled in a better way. Only compile it in when
- tm-mips.h is included. */
-
-#ifdef TM_MIPS_H
-
-void
-fixup_sigtramp (void)
-{
- struct symbol *s;
- struct symtab *st;
- struct block *b, *b0 = NULL;
-
- sigtramp_address = -1;
-
- /* We have to handle the following cases here:
- a) The Mips library has a sigtramp label within sigvec.
- b) Irix has a _sigtramp which we want to use, but it also has sigvec. */
- s = lookup_symbol ("sigvec", 0, VAR_DOMAIN, 0, NULL);
- if (s != 0)
- {
- b0 = SYMBOL_BLOCK_VALUE (s);
- s = lookup_symbol ("sigtramp", b0, VAR_DOMAIN, 0, NULL);
- }
- if (s == 0)
- {
- /* No sigvec or no sigtramp inside sigvec, try _sigtramp. */
- s = lookup_symbol ("_sigtramp", 0, VAR_DOMAIN, 0, NULL);
- }
-
- /* But maybe this program uses its own version of sigvec */
- if (s == 0)
- return;
-
- /* Did we or MIPSco fix the library ? */
- if (SYMBOL_CLASS (s) == LOC_BLOCK)
- {
- sigtramp_address = BLOCK_START (SYMBOL_BLOCK_VALUE (s));
- sigtramp_end = BLOCK_END (SYMBOL_BLOCK_VALUE (s));
- return;
- }
-
- sigtramp_address = SYMBOL_VALUE (s);
- sigtramp_end = sigtramp_address + 0x88; /* black magic */
-
- /* But what symtab does it live in ? */
- st = find_pc_symtab (SYMBOL_VALUE (s));
-
- /*
- * Ok, there goes the fix: turn it into a procedure, with all the
- * needed info. Note we make it a nested procedure of sigvec,
- * which is the way the (assembly) code is actually written.
- */
- SYMBOL_DOMAIN (s) = VAR_DOMAIN;
- SYMBOL_CLASS (s) = LOC_BLOCK;
- SYMBOL_TYPE (s) = init_type (TYPE_CODE_FUNC, 4, 0, (char *) NULL,
- st->objfile);
- TYPE_TARGET_TYPE (SYMBOL_TYPE (s)) = mdebug_type_void;
-
- /* Need a block to allocate MIPS_EFI_SYMBOL_NAME in */
- b = new_block (NON_FUNCTION_BLOCK);
- SYMBOL_BLOCK_VALUE (s) = b;
- BLOCK_START (b) = sigtramp_address;
- BLOCK_END (b) = sigtramp_end;
- BLOCK_FUNCTION (b) = s;
- BLOCK_SUPERBLOCK (b) = BLOCK_SUPERBLOCK (b0);
- add_block (b, st);
- sort_blocks (st);
-
- /* Make a MIPS_EFI_SYMBOL_NAME entry for it */
- {
- struct mips_extra_func_info *e =
- ((struct mips_extra_func_info *)
- xzalloc (sizeof (struct mips_extra_func_info)));
-
- e->numargs = 0; /* the kernel thinks otherwise */
- e->pdr.frameoffset = 32;
- e->pdr.framereg = SP_REGNUM;
- /* Note that setting pcreg is no longer strictly necessary as
- mips_frame_saved_pc is now aware of signal handler frames. */
- e->pdr.pcreg = PC_REGNUM;
- e->pdr.regmask = -2;
- /* Offset to saved r31, in the sigtramp case the saved registers
- are above the frame in the sigcontext.
- We have 4 alignment bytes, 12 bytes for onstack, mask and pc,
- 32 * 4 bytes for the general registers, 12 bytes for mdhi, mdlo, ownedfp
- and 32 * 4 bytes for the floating point registers. */
- e->pdr.regoffset = 4 + 12 + 31 * 4;
- e->pdr.fregmask = -1;
- /* Offset to saved f30 (first saved *double* register). */
- e->pdr.fregoffset = 4 + 12 + 32 * 4 + 12 + 30 * 4;
- e->pdr.isym = (long) s;
- e->pdr.adr = sigtramp_address;
-
- current_objfile = st->objfile; /* Keep new_symbol happy */
- s = new_symbol (MIPS_EFI_SYMBOL_NAME);
- SYMBOL_VALUE (s) = (long) e;
- SYMBOL_DOMAIN (s) = LABEL_DOMAIN;
- SYMBOL_CLASS (s) = LOC_CONST;
- SYMBOL_TYPE (s) = mdebug_type_void;
- current_objfile = NULL;
- }
-
- dict_add_symbol (BLOCK_DICT (b), s);
-}
-
-#endif /* TM_MIPS_H */
void
_initialize_mdebugread (void)
diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c
index 6da91ab..5c77340 100644
--- a/gdb/mips-tdep.c
+++ b/gdb/mips-tdep.c
@@ -4841,16 +4841,6 @@ mips_skip_prologue (CORE_ADDR pc)
return mips32_skip_prologue (pc);
}
-/* Exported procedure: Is PC in the signal trampoline code */
-
-static int
-mips_pc_in_sigtramp (CORE_ADDR pc, char *ignore)
-{
- if (sigtramp_address == 0)
- fixup_sigtramp ();
- return (pc >= sigtramp_address && pc < sigtramp_end);
-}
-
/* Root of all "set mips "/"show mips " commands. This will eventually be
used for all MIPS-specific commands. */
@@ -5781,7 +5771,6 @@ mips_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_register_type (gdbarch, mips_register_type);
set_gdbarch_print_registers_info (gdbarch, mips_print_registers_info);
- set_gdbarch_deprecated_pc_in_sigtramp (gdbarch, mips_pc_in_sigtramp);
set_gdbarch_print_insn (gdbarch, gdb_print_insn_mips);
diff --git a/gdb/mipsread.c b/gdb/mipsread.c
index f67eeea..d0d0b9d 100644
--- a/gdb/mipsread.c
+++ b/gdb/mipsread.c
@@ -59,12 +59,9 @@ read_alphacoff_dynamic_symtab (struct section_offsets *,
symbol file is specified (not just adding some symbols from another
file, e.g. a shared library). */
-extern CORE_ADDR sigtramp_address;
-
static void
mipscoff_new_init (struct objfile *ignore)
{
- sigtramp_address = 0;
stabsread_new_init ();
buildsym_new_init ();
}