From: Andrew Cagney Date: Tue, 23 Mar 2004 15:16:47 +0000 (+0000) Subject: 2004-03-23 Andrew Cagney X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=aa2a3f87e946fd500d0657c0f3e61f10780b8bfa;p=binutils-gdb.git 2004-03-23 Andrew Cagney * gdbarch.sh (SIGTRAMP_START, SIGTRAMP_END): Deprecate. * gdbarch.h, gdbarch.c: Re-generate. * i386obsd-tdep.c (i386obsd_init_abi): Update. * i386nbsd-tdep.c (i386nbsd_init_abi): Update. * i386bsd-tdep.c (i386bsd_init_abi): Update. * config/vax/tm-vaxbsd.h (DEPRECATED_SIGTRAMP_END) (DEPRECATED_SIGTRAMP_START): Update. * config/m68k/tm-nbsd.h (DEPRECATED_SIGTRAMP_END) (DEPRECATED_SIGTRAMP_START): Update. * blockframe.c (find_pc_sect_partial_function): Update. * arch-utils.c (legacy_pc_in_sigtramp): Update. Index: doc/ChangeLog 2004-03-23 Andrew Cagney * gdbint.texinfo (Target Architecture Definition): Deprecate references to SIGTRAMP_START and SIGTRAMP_END. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index d62b3ed825e..b6120c4a1e4 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,17 @@ +2004-03-23 Andrew Cagney + + * gdbarch.sh (SIGTRAMP_START, SIGTRAMP_END): Deprecate. + * gdbarch.h, gdbarch.c: Re-generate. + * i386obsd-tdep.c (i386obsd_init_abi): Update. + * i386nbsd-tdep.c (i386nbsd_init_abi): Update. + * i386bsd-tdep.c (i386bsd_init_abi): Update. + * config/vax/tm-vaxbsd.h (DEPRECATED_SIGTRAMP_END) + (DEPRECATED_SIGTRAMP_START): Update. + * config/m68k/tm-nbsd.h (DEPRECATED_SIGTRAMP_END) + (DEPRECATED_SIGTRAMP_START): Update. + * blockframe.c (find_pc_sect_partial_function): Update. + * arch-utils.c (legacy_pc_in_sigtramp): Update. + 2004-03-23 Daniel Jacobowitz * remote.c (remote_open_1): Reopen the exec file and reread symbols diff --git a/gdb/arch-utils.c b/gdb/arch-utils.c index 1e4ce1d6ba7..d76a8e40a7f 100644 --- a/gdb/arch-utils.c +++ b/gdb/arch-utils.c @@ -299,8 +299,9 @@ int legacy_pc_in_sigtramp (CORE_ADDR pc, char *name) { #if !defined (DEPRECATED_IN_SIGTRAMP) - if (SIGTRAMP_START_P ()) - return (pc) >= SIGTRAMP_START (pc) && (pc) < SIGTRAMP_END (pc); + if (DEPRECATED_SIGTRAMP_START_P ()) + return ((pc) >= DEPRECATED_SIGTRAMP_START (pc) + && (pc) < DEPRECATED_SIGTRAMP_END (pc)); else return name && strcmp ("_sigtramp", name) == 0; #else diff --git a/gdb/blockframe.c b/gdb/blockframe.c index d119f932740..5fd20f0e43d 100644 --- a/gdb/blockframe.c +++ b/gdb/blockframe.c @@ -382,11 +382,16 @@ find_pc_partial_function (CORE_ADDR pc, char **name, CORE_ADDR *address, /* If sigtramp is in the u area, it counts as a function (especially important for step_1). */ - if (SIGTRAMP_START_P () + /* NOTE: cagney/2004-03-16: Determining if the PC is in a signal + trampoline typically depends on the detailed analysis of dynamic + information obtained from the inferior yet this function is + expected to work using static information obtained from the + symbol table. */ + if (DEPRECATED_SIGTRAMP_START_P () && DEPRECATED_PC_IN_SIGTRAMP (mapped_pc, (char *) NULL)) { - cache_pc_function_low = SIGTRAMP_START (mapped_pc); - cache_pc_function_high = SIGTRAMP_END (mapped_pc); + cache_pc_function_low = DEPRECATED_SIGTRAMP_START (mapped_pc); + cache_pc_function_high = DEPRECATED_SIGTRAMP_END (mapped_pc); cache_pc_function_name = ""; cache_pc_function_section = section; goto return_cached_value; diff --git a/gdb/config/m68k/tm-nbsd.h b/gdb/config/m68k/tm-nbsd.h index 62f008c7249..05deff7cc57 100644 --- a/gdb/config/m68k/tm-nbsd.h +++ b/gdb/config/m68k/tm-nbsd.h @@ -33,8 +33,8 @@ #define STACK_END_ADDR USRSTACK /* For NetBSD, sigtramp is 32 bytes before STACK_END_ADDR. */ -#define SIGTRAMP_START(pc) (STACK_END_ADDR - 32) -#define SIGTRAMP_END(pc) (STACK_END_ADDR) +#define DEPRECATED_SIGTRAMP_START(pc) (STACK_END_ADDR - 32) +#define DEPRECATED_SIGTRAMP_END(pc) (STACK_END_ADDR) #include "m68k/tm-m68k.h" diff --git a/gdb/config/vax/tm-vaxbsd.h b/gdb/config/vax/tm-vaxbsd.h index aa34107e02d..16f08d44655 100644 --- a/gdb/config/vax/tm-vaxbsd.h +++ b/gdb/config/vax/tm-vaxbsd.h @@ -29,7 +29,7 @@ /* On the VAX, sigtramp is in the u area. Can't check the exact addresses because for cross-debugging we don't have VAX include files around. This should be close enough. */ -#define SIGTRAMP_START(pc) STACK_END_ADDR -#define SIGTRAMP_END(pc) 0x80000000 +#define DEPRECATED_SIGTRAMP_START(pc) STACK_END_ADDR +#define DEPRECATED_SIGTRAMP_END(pc) 0x80000000 #endif /* TM_VAXBSD_H */ diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog index f2cf87ef238..196c1fc598a 100644 --- a/gdb/doc/ChangeLog +++ b/gdb/doc/ChangeLog @@ -1,3 +1,8 @@ +2004-03-23 Andrew Cagney + + * gdbint.texinfo (Target Architecture Definition): Deprecate + references to SIGTRAMP_START and SIGTRAMP_END. + 2004-03-23 Andrew Cagney * gdbint.texinfo (Target Architecture Definition): Deprecate diff --git a/gdb/doc/gdbint.texinfo b/gdb/doc/gdbint.texinfo index 54ee579777d..0013a41434c 100644 --- a/gdb/doc/gdbint.texinfo +++ b/gdb/doc/gdbint.texinfo @@ -3411,10 +3411,10 @@ The epilogue of a function is defined as the part of a function where the stack frame of the function already has been destroyed up to the final `return from function call' instruction. -@item SIGTRAMP_START (@var{pc}) -@findex SIGTRAMP_START -@itemx SIGTRAMP_END (@var{pc}) -@findex SIGTRAMP_END +@item DEPRECATED_SIGTRAMP_START (@var{pc}) +@findex DEPRECATED_SIGTRAMP_START +@itemx DEPRECATED_SIGTRAMP_END (@var{pc}) +@findex DEPRECATED_SIGTRAMP_END Define these to be the start and end address of the @code{sigtramp} for the given @var{pc}. On machines where the address is just a compile time constant, the macro expansion will typically just ignore the supplied diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c index 0e8f1fe6e4d..d6246af2a80 100644 --- a/gdb/gdbarch.c +++ b/gdb/gdbarch.c @@ -246,8 +246,8 @@ struct gdbarch gdbarch_in_solib_call_trampoline_ftype *in_solib_call_trampoline; gdbarch_in_solib_return_trampoline_ftype *in_solib_return_trampoline; gdbarch_deprecated_pc_in_sigtramp_ftype *deprecated_pc_in_sigtramp; - gdbarch_sigtramp_start_ftype *sigtramp_start; - gdbarch_sigtramp_end_ftype *sigtramp_end; + gdbarch_deprecated_sigtramp_start_ftype *deprecated_sigtramp_start; + gdbarch_deprecated_sigtramp_end_ftype *deprecated_sigtramp_end; gdbarch_in_function_epilogue_p_ftype *in_function_epilogue_p; gdbarch_construct_inferior_arguments_ftype *construct_inferior_arguments; gdbarch_elf_make_msymbol_special_ftype *elf_make_msymbol_special; @@ -413,8 +413,8 @@ struct gdbarch startup_gdbarch = 0, /* in_solib_call_trampoline */ 0, /* in_solib_return_trampoline */ 0, /* deprecated_pc_in_sigtramp */ - 0, /* sigtramp_start */ - 0, /* sigtramp_end */ + 0, /* deprecated_sigtramp_start */ + 0, /* deprecated_sigtramp_end */ generic_in_function_epilogue_p, /* in_function_epilogue_p */ construct_inferior_arguments, /* construct_inferior_arguments */ 0, /* elf_make_msymbol_special */ @@ -721,8 +721,8 @@ verify_gdbarch (struct gdbarch *current_gdbarch) /* Skip verify of in_solib_call_trampoline, invalid_p == 0 */ /* Skip verify of in_solib_return_trampoline, invalid_p == 0 */ /* Skip verify of deprecated_pc_in_sigtramp, has predicate */ - /* Skip verify of sigtramp_start, has predicate */ - /* Skip verify of sigtramp_end, has predicate */ + /* Skip verify of deprecated_sigtramp_start, has predicate */ + /* Skip verify of deprecated_sigtramp_end, has predicate */ /* Skip verify of in_function_epilogue_p, invalid_p == 0 */ /* Skip verify of construct_inferior_arguments, invalid_p == 0 */ /* Skip verify of elf_make_msymbol_special, invalid_p == 0 */ @@ -1623,6 +1623,44 @@ gdbarch_dump (struct gdbarch *current_gdbarch, struct ui_file *file) (long) current_gdbarch->deprecated_save_dummy_frame_tos /*DEPRECATED_SAVE_DUMMY_FRAME_TOS ()*/); #endif +#ifdef DEPRECATED_SIGTRAMP_END_P + fprintf_unfiltered (file, + "gdbarch_dump: %s # %s\n", + "DEPRECATED_SIGTRAMP_END_P()", + XSTRING (DEPRECATED_SIGTRAMP_END_P ())); + fprintf_unfiltered (file, + "gdbarch_dump: DEPRECATED_SIGTRAMP_END_P() = %d\n", + DEPRECATED_SIGTRAMP_END_P ()); +#endif +#ifdef DEPRECATED_SIGTRAMP_END + fprintf_unfiltered (file, + "gdbarch_dump: %s # %s\n", + "DEPRECATED_SIGTRAMP_END(pc)", + XSTRING (DEPRECATED_SIGTRAMP_END (pc))); + fprintf_unfiltered (file, + "gdbarch_dump: DEPRECATED_SIGTRAMP_END = <0x%08lx>\n", + (long) current_gdbarch->deprecated_sigtramp_end + /*DEPRECATED_SIGTRAMP_END ()*/); +#endif +#ifdef DEPRECATED_SIGTRAMP_START_P + fprintf_unfiltered (file, + "gdbarch_dump: %s # %s\n", + "DEPRECATED_SIGTRAMP_START_P()", + XSTRING (DEPRECATED_SIGTRAMP_START_P ())); + fprintf_unfiltered (file, + "gdbarch_dump: DEPRECATED_SIGTRAMP_START_P() = %d\n", + DEPRECATED_SIGTRAMP_START_P ()); +#endif +#ifdef DEPRECATED_SIGTRAMP_START + fprintf_unfiltered (file, + "gdbarch_dump: %s # %s\n", + "DEPRECATED_SIGTRAMP_START(pc)", + XSTRING (DEPRECATED_SIGTRAMP_START (pc))); + fprintf_unfiltered (file, + "gdbarch_dump: DEPRECATED_SIGTRAMP_START = <0x%08lx>\n", + (long) current_gdbarch->deprecated_sigtramp_start + /*DEPRECATED_SIGTRAMP_START ()*/); +#endif #ifdef DEPRECATED_SIZEOF_CALL_DUMMY_WORDS fprintf_unfiltered (file, "gdbarch_dump: DEPRECATED_SIZEOF_CALL_DUMMY_WORDS # %s\n", @@ -2085,44 +2123,6 @@ gdbarch_dump (struct gdbarch *current_gdbarch, struct ui_file *file) (long) current_gdbarch->sdb_reg_to_regnum /*SDB_REG_TO_REGNUM ()*/); #endif -#ifdef SIGTRAMP_END_P - fprintf_unfiltered (file, - "gdbarch_dump: %s # %s\n", - "SIGTRAMP_END_P()", - XSTRING (SIGTRAMP_END_P ())); - fprintf_unfiltered (file, - "gdbarch_dump: SIGTRAMP_END_P() = %d\n", - SIGTRAMP_END_P ()); -#endif -#ifdef SIGTRAMP_END - fprintf_unfiltered (file, - "gdbarch_dump: %s # %s\n", - "SIGTRAMP_END(pc)", - XSTRING (SIGTRAMP_END (pc))); - fprintf_unfiltered (file, - "gdbarch_dump: SIGTRAMP_END = <0x%08lx>\n", - (long) current_gdbarch->sigtramp_end - /*SIGTRAMP_END ()*/); -#endif -#ifdef SIGTRAMP_START_P - fprintf_unfiltered (file, - "gdbarch_dump: %s # %s\n", - "SIGTRAMP_START_P()", - XSTRING (SIGTRAMP_START_P ())); - fprintf_unfiltered (file, - "gdbarch_dump: SIGTRAMP_START_P() = %d\n", - SIGTRAMP_START_P ()); -#endif -#ifdef SIGTRAMP_START - fprintf_unfiltered (file, - "gdbarch_dump: %s # %s\n", - "SIGTRAMP_START(pc)", - XSTRING (SIGTRAMP_START (pc))); - fprintf_unfiltered (file, - "gdbarch_dump: SIGTRAMP_START = <0x%08lx>\n", - (long) current_gdbarch->sigtramp_start - /*SIGTRAMP_START ()*/); -#endif #ifdef SKIP_PROLOGUE fprintf_unfiltered (file, "gdbarch_dump: %s # %s\n", @@ -5088,51 +5088,51 @@ set_gdbarch_deprecated_pc_in_sigtramp (struct gdbarch *gdbarch, } int -gdbarch_sigtramp_start_p (struct gdbarch *gdbarch) +gdbarch_deprecated_sigtramp_start_p (struct gdbarch *gdbarch) { gdb_assert (gdbarch != NULL); - return gdbarch->sigtramp_start != NULL; + return gdbarch->deprecated_sigtramp_start != NULL; } CORE_ADDR -gdbarch_sigtramp_start (struct gdbarch *gdbarch, CORE_ADDR pc) +gdbarch_deprecated_sigtramp_start (struct gdbarch *gdbarch, CORE_ADDR pc) { gdb_assert (gdbarch != NULL); - gdb_assert (gdbarch->sigtramp_start != NULL); + gdb_assert (gdbarch->deprecated_sigtramp_start != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_sigtramp_start called\n"); - return gdbarch->sigtramp_start (pc); + fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_sigtramp_start called\n"); + return gdbarch->deprecated_sigtramp_start (pc); } void -set_gdbarch_sigtramp_start (struct gdbarch *gdbarch, - gdbarch_sigtramp_start_ftype sigtramp_start) +set_gdbarch_deprecated_sigtramp_start (struct gdbarch *gdbarch, + gdbarch_deprecated_sigtramp_start_ftype deprecated_sigtramp_start) { - gdbarch->sigtramp_start = sigtramp_start; + gdbarch->deprecated_sigtramp_start = deprecated_sigtramp_start; } int -gdbarch_sigtramp_end_p (struct gdbarch *gdbarch) +gdbarch_deprecated_sigtramp_end_p (struct gdbarch *gdbarch) { gdb_assert (gdbarch != NULL); - return gdbarch->sigtramp_end != NULL; + return gdbarch->deprecated_sigtramp_end != NULL; } CORE_ADDR -gdbarch_sigtramp_end (struct gdbarch *gdbarch, CORE_ADDR pc) +gdbarch_deprecated_sigtramp_end (struct gdbarch *gdbarch, CORE_ADDR pc) { gdb_assert (gdbarch != NULL); - gdb_assert (gdbarch->sigtramp_end != NULL); + gdb_assert (gdbarch->deprecated_sigtramp_end != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_sigtramp_end called\n"); - return gdbarch->sigtramp_end (pc); + fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_sigtramp_end called\n"); + return gdbarch->deprecated_sigtramp_end (pc); } void -set_gdbarch_sigtramp_end (struct gdbarch *gdbarch, - gdbarch_sigtramp_end_ftype sigtramp_end) +set_gdbarch_deprecated_sigtramp_end (struct gdbarch *gdbarch, + gdbarch_deprecated_sigtramp_end_ftype deprecated_sigtramp_end) { - gdbarch->sigtramp_end = sigtramp_end; + gdbarch->deprecated_sigtramp_end = deprecated_sigtramp_end; } int diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h index c82958690af..8585b701a4a 100644 --- a/gdb/gdbarch.h +++ b/gdb/gdbarch.h @@ -2109,29 +2109,9 @@ extern void set_gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch, gdb #define IN_SOLIB_RETURN_TRAMPOLINE(pc, name) (gdbarch_in_solib_return_trampoline (current_gdbarch, pc, name)) #endif -/* Sigtramp is a routine that the kernel calls (which then calls the - signal handler). On most machines it is a library routine that is - linked into the executable. - - This macro, given a program counter value and the name of the - function in which that PC resides (which can be null if the name is - not known), returns nonzero if the PC and name show that we are in - sigtramp. - - On most machines just see if the name is sigtramp (and if we have - no name, assume we are not in sigtramp). - - FIXME: cagney/2002-04-21: The function find_pc_partial_function - calls find_pc_sect_partial_function() which calls - DEPRECATED_PC_IN_SIGTRAMP. This means DEPRECATED_PC_IN_SIGTRAMP - function can't be implemented by doing its own local NAME lookup. - - FIXME: cagney/2002-04-21: DEPRECATED_PC_IN_SIGTRAMP is something of - a mess. Some code also depends on SIGTRAMP_START and SIGTRAMP_END - but other does not. - - NOTE: cagney/2004-03-16: DEPRECATED_PC_IN_SIGTRAMP has been made - obsolete by signal trampoline frame unwind sniffers. */ +/* NOTE: cagney/2004-03-23: DEPRECATED_SIGTRAMP_START, + DEPRECATED_SIGTRAMP_END, and DEPRECATED_PC_IN_SIGTRAMP have all been + superseeded by signal trampoline frame sniffers. */ #if defined (DEPRECATED_PC_IN_SIGTRAMP) /* Legacy for systems yet to multi-arch DEPRECATED_PC_IN_SIGTRAMP */ @@ -2158,54 +2138,54 @@ extern void set_gdbarch_deprecated_pc_in_sigtramp (struct gdbarch *gdbarch, gdba #define DEPRECATED_PC_IN_SIGTRAMP(pc, name) (gdbarch_deprecated_pc_in_sigtramp (current_gdbarch, pc, name)) #endif -#if defined (SIGTRAMP_START) -/* Legacy for systems yet to multi-arch SIGTRAMP_START */ -#if !defined (SIGTRAMP_START_P) -#define SIGTRAMP_START_P() (1) +#if defined (DEPRECATED_SIGTRAMP_START) +/* Legacy for systems yet to multi-arch DEPRECATED_SIGTRAMP_START */ +#if !defined (DEPRECATED_SIGTRAMP_START_P) +#define DEPRECATED_SIGTRAMP_START_P() (1) #endif #endif -extern int gdbarch_sigtramp_start_p (struct gdbarch *gdbarch); -#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SIGTRAMP_START_P) -#error "Non multi-arch definition of SIGTRAMP_START" +extern int gdbarch_deprecated_sigtramp_start_p (struct gdbarch *gdbarch); +#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_SIGTRAMP_START_P) +#error "Non multi-arch definition of DEPRECATED_SIGTRAMP_START" #endif -#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (SIGTRAMP_START_P) -#define SIGTRAMP_START_P() (gdbarch_sigtramp_start_p (current_gdbarch)) +#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_SIGTRAMP_START_P) +#define DEPRECATED_SIGTRAMP_START_P() (gdbarch_deprecated_sigtramp_start_p (current_gdbarch)) #endif -typedef CORE_ADDR (gdbarch_sigtramp_start_ftype) (CORE_ADDR pc); -extern CORE_ADDR gdbarch_sigtramp_start (struct gdbarch *gdbarch, CORE_ADDR pc); -extern void set_gdbarch_sigtramp_start (struct gdbarch *gdbarch, gdbarch_sigtramp_start_ftype *sigtramp_start); -#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SIGTRAMP_START) -#error "Non multi-arch definition of SIGTRAMP_START" +typedef CORE_ADDR (gdbarch_deprecated_sigtramp_start_ftype) (CORE_ADDR pc); +extern CORE_ADDR gdbarch_deprecated_sigtramp_start (struct gdbarch *gdbarch, CORE_ADDR pc); +extern void set_gdbarch_deprecated_sigtramp_start (struct gdbarch *gdbarch, gdbarch_deprecated_sigtramp_start_ftype *deprecated_sigtramp_start); +#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_SIGTRAMP_START) +#error "Non multi-arch definition of DEPRECATED_SIGTRAMP_START" #endif -#if !defined (SIGTRAMP_START) -#define SIGTRAMP_START(pc) (gdbarch_sigtramp_start (current_gdbarch, pc)) +#if !defined (DEPRECATED_SIGTRAMP_START) +#define DEPRECATED_SIGTRAMP_START(pc) (gdbarch_deprecated_sigtramp_start (current_gdbarch, pc)) #endif -#if defined (SIGTRAMP_END) -/* Legacy for systems yet to multi-arch SIGTRAMP_END */ -#if !defined (SIGTRAMP_END_P) -#define SIGTRAMP_END_P() (1) +#if defined (DEPRECATED_SIGTRAMP_END) +/* Legacy for systems yet to multi-arch DEPRECATED_SIGTRAMP_END */ +#if !defined (DEPRECATED_SIGTRAMP_END_P) +#define DEPRECATED_SIGTRAMP_END_P() (1) #endif #endif -extern int gdbarch_sigtramp_end_p (struct gdbarch *gdbarch); -#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SIGTRAMP_END_P) -#error "Non multi-arch definition of SIGTRAMP_END" +extern int gdbarch_deprecated_sigtramp_end_p (struct gdbarch *gdbarch); +#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_SIGTRAMP_END_P) +#error "Non multi-arch definition of DEPRECATED_SIGTRAMP_END" #endif -#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (SIGTRAMP_END_P) -#define SIGTRAMP_END_P() (gdbarch_sigtramp_end_p (current_gdbarch)) +#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_SIGTRAMP_END_P) +#define DEPRECATED_SIGTRAMP_END_P() (gdbarch_deprecated_sigtramp_end_p (current_gdbarch)) #endif -typedef CORE_ADDR (gdbarch_sigtramp_end_ftype) (CORE_ADDR pc); -extern CORE_ADDR gdbarch_sigtramp_end (struct gdbarch *gdbarch, CORE_ADDR pc); -extern void set_gdbarch_sigtramp_end (struct gdbarch *gdbarch, gdbarch_sigtramp_end_ftype *sigtramp_end); -#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SIGTRAMP_END) -#error "Non multi-arch definition of SIGTRAMP_END" +typedef CORE_ADDR (gdbarch_deprecated_sigtramp_end_ftype) (CORE_ADDR pc); +extern CORE_ADDR gdbarch_deprecated_sigtramp_end (struct gdbarch *gdbarch, CORE_ADDR pc); +extern void set_gdbarch_deprecated_sigtramp_end (struct gdbarch *gdbarch, gdbarch_deprecated_sigtramp_end_ftype *deprecated_sigtramp_end); +#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_SIGTRAMP_END) +#error "Non multi-arch definition of DEPRECATED_SIGTRAMP_END" #endif -#if !defined (SIGTRAMP_END) -#define SIGTRAMP_END(pc) (gdbarch_sigtramp_end (current_gdbarch, pc)) +#if !defined (DEPRECATED_SIGTRAMP_END) +#define DEPRECATED_SIGTRAMP_END(pc) (gdbarch_deprecated_sigtramp_end (current_gdbarch, pc)) #endif /* A target might have problems with watchpoints as soon as the stack diff --git a/gdb/gdbarch.sh b/gdb/gdbarch.sh index 64886b5acc2..7292a0bb0c5 100755 --- a/gdb/gdbarch.sh +++ b/gdb/gdbarch.sh @@ -723,32 +723,12 @@ f:2:IN_SOLIB_CALL_TRAMPOLINE:int:in_solib_call_trampoline:CORE_ADDR pc, char *na # Some systems also have trampoline code for returning from shared libs. f:2:IN_SOLIB_RETURN_TRAMPOLINE:int:in_solib_return_trampoline:CORE_ADDR pc, char *name:pc, name:::generic_in_solib_return_trampoline::0 -# Sigtramp is a routine that the kernel calls (which then calls the -# signal handler). On most machines it is a library routine that is -# linked into the executable. -# -# This macro, given a program counter value and the name of the -# function in which that PC resides (which can be null if the name is -# not known), returns nonzero if the PC and name show that we are in -# sigtramp. -# -# On most machines just see if the name is sigtramp (and if we have -# no name, assume we are not in sigtramp). -# -# FIXME: cagney/2002-04-21: The function find_pc_partial_function -# calls find_pc_sect_partial_function() which calls -# DEPRECATED_PC_IN_SIGTRAMP. This means DEPRECATED_PC_IN_SIGTRAMP -# function can't be implemented by doing its own local NAME lookup. -# -# FIXME: cagney/2002-04-21: DEPRECATED_PC_IN_SIGTRAMP is something of -# a mess. Some code also depends on SIGTRAMP_START and SIGTRAMP_END -# but other does not. -# -# NOTE: cagney/2004-03-16: DEPRECATED_PC_IN_SIGTRAMP has been made -# obsolete by signal trampoline frame unwind sniffers. +# NOTE: cagney/2004-03-23: DEPRECATED_SIGTRAMP_START, +# DEPRECATED_SIGTRAMP_END, and DEPRECATED_PC_IN_SIGTRAMP have all been +# superseeded by signal trampoline frame sniffers. F::DEPRECATED_PC_IN_SIGTRAMP:int:deprecated_pc_in_sigtramp:CORE_ADDR pc, char *name:pc, name:::legacy_pc_in_sigtramp -F:2:SIGTRAMP_START:CORE_ADDR:sigtramp_start:CORE_ADDR pc:pc -F:2:SIGTRAMP_END:CORE_ADDR:sigtramp_end:CORE_ADDR pc:pc +F:2:DEPRECATED_SIGTRAMP_START:CORE_ADDR:deprecated_sigtramp_start:CORE_ADDR pc:pc +F:2:DEPRECATED_SIGTRAMP_END:CORE_ADDR:deprecated_sigtramp_end:CORE_ADDR pc:pc # A target might have problems with watchpoints as soon as the stack # frame of the current function has been destroyed. This mostly happens # as the first action in a funtion's epilogue. in_function_epilogue_p() diff --git a/gdb/i386bsd-tdep.c b/gdb/i386bsd-tdep.c index f20953b6dce..d501f7380db 100644 --- a/gdb/i386bsd-tdep.c +++ b/gdb/i386bsd-tdep.c @@ -115,8 +115,8 @@ i386bsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch) set_gdbarch_deprecated_pc_in_sigtramp (gdbarch, i386bsd_pc_in_sigtramp); /* Allow the recognition of sigtramps as a function named . */ - set_gdbarch_sigtramp_start (gdbarch, i386bsd_sigtramp_start); - set_gdbarch_sigtramp_end (gdbarch, i386bsd_sigtramp_end); + set_gdbarch_deprecated_sigtramp_start (gdbarch, i386bsd_sigtramp_start); + set_gdbarch_deprecated_sigtramp_end (gdbarch, i386bsd_sigtramp_end); /* Assume SunOS-style shared libraries. */ set_gdbarch_in_solib_call_trampoline (gdbarch, diff --git a/gdb/i386nbsd-tdep.c b/gdb/i386nbsd-tdep.c index 23ab91b40e5..e1e05aabf29 100644 --- a/gdb/i386nbsd-tdep.c +++ b/gdb/i386nbsd-tdep.c @@ -229,8 +229,8 @@ i386nbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch) /* FIXME: kettenis/20020906: We should probably provide NetBSD-specific versions of these functions if we want to recognize signal trampolines that live on the stack. */ - set_gdbarch_sigtramp_start (gdbarch, NULL); - set_gdbarch_sigtramp_end (gdbarch, NULL); + set_gdbarch_deprecated_sigtramp_start (gdbarch, NULL); + set_gdbarch_deprecated_sigtramp_end (gdbarch, NULL); /* NetBSD uses -freg-struct-return by default. */ tdep->struct_return = reg_struct_return; diff --git a/gdb/i386obsd-tdep.c b/gdb/i386obsd-tdep.c index cd6e37af035..740bae37456 100644 --- a/gdb/i386obsd-tdep.c +++ b/gdb/i386obsd-tdep.c @@ -216,8 +216,8 @@ i386obsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch) tdep->sigtramp_start = i386obsd_sigtramp_start_addr; tdep->sigtramp_end = i386obsd_sigtramp_end_addr; set_gdbarch_deprecated_pc_in_sigtramp (gdbarch, i386obsd_pc_in_sigtramp); - set_gdbarch_sigtramp_start (gdbarch, i386obsd_sigtramp_start); - set_gdbarch_sigtramp_end (gdbarch, i386obsd_sigtramp_end); + set_gdbarch_deprecated_sigtramp_start (gdbarch, i386obsd_sigtramp_start); + set_gdbarch_deprecated_sigtramp_end (gdbarch, i386obsd_sigtramp_end); /* OpenBSD has a `struct sigcontext' that's different from the original 4.3 BSD. */