2004-03-23 Andrew Cagney <cagney@redhat.com>

* 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  <cagney@redhat.com>

	* gdbint.texinfo (Target Architecture Definition): Deprecate
	references to SIGTRAMP_START and SIGTRAMP_END.
This commit is contained in:
Andrew Cagney 2004-03-23 15:16:47 +00:00
parent 00cac89514
commit aa2a3f87e9
13 changed files with 146 additions and 161 deletions

View File

@ -1,3 +1,17 @@
2004-03-23 Andrew Cagney <cagney@redhat.com>
* 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 <drow@mvista.com> 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
* remote.c (remote_open_1): Reopen the exec file and reread symbols * remote.c (remote_open_1): Reopen the exec file and reread symbols

View File

@ -299,8 +299,9 @@ int
legacy_pc_in_sigtramp (CORE_ADDR pc, char *name) legacy_pc_in_sigtramp (CORE_ADDR pc, char *name)
{ {
#if !defined (DEPRECATED_IN_SIGTRAMP) #if !defined (DEPRECATED_IN_SIGTRAMP)
if (SIGTRAMP_START_P ()) if (DEPRECATED_SIGTRAMP_START_P ())
return (pc) >= SIGTRAMP_START (pc) && (pc) < SIGTRAMP_END (pc); return ((pc) >= DEPRECATED_SIGTRAMP_START (pc)
&& (pc) < DEPRECATED_SIGTRAMP_END (pc));
else else
return name && strcmp ("_sigtramp", name) == 0; return name && strcmp ("_sigtramp", name) == 0;
#else #else

View File

@ -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 /* If sigtramp is in the u area, it counts as a function (especially
important for step_1). */ 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)) && DEPRECATED_PC_IN_SIGTRAMP (mapped_pc, (char *) NULL))
{ {
cache_pc_function_low = SIGTRAMP_START (mapped_pc); cache_pc_function_low = DEPRECATED_SIGTRAMP_START (mapped_pc);
cache_pc_function_high = SIGTRAMP_END (mapped_pc); cache_pc_function_high = DEPRECATED_SIGTRAMP_END (mapped_pc);
cache_pc_function_name = "<sigtramp>"; cache_pc_function_name = "<sigtramp>";
cache_pc_function_section = section; cache_pc_function_section = section;
goto return_cached_value; goto return_cached_value;

View File

@ -33,8 +33,8 @@
#define STACK_END_ADDR USRSTACK #define STACK_END_ADDR USRSTACK
/* For NetBSD, sigtramp is 32 bytes before STACK_END_ADDR. */ /* For NetBSD, sigtramp is 32 bytes before STACK_END_ADDR. */
#define SIGTRAMP_START(pc) (STACK_END_ADDR - 32) #define DEPRECATED_SIGTRAMP_START(pc) (STACK_END_ADDR - 32)
#define SIGTRAMP_END(pc) (STACK_END_ADDR) #define DEPRECATED_SIGTRAMP_END(pc) (STACK_END_ADDR)
#include "m68k/tm-m68k.h" #include "m68k/tm-m68k.h"

View File

@ -29,7 +29,7 @@
/* On the VAX, sigtramp is in the u area. Can't check the exact /* 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 addresses because for cross-debugging we don't have VAX include
files around. This should be close enough. */ files around. This should be close enough. */
#define SIGTRAMP_START(pc) STACK_END_ADDR #define DEPRECATED_SIGTRAMP_START(pc) STACK_END_ADDR
#define SIGTRAMP_END(pc) 0x80000000 #define DEPRECATED_SIGTRAMP_END(pc) 0x80000000
#endif /* TM_VAXBSD_H */ #endif /* TM_VAXBSD_H */

View File

@ -1,3 +1,8 @@
2004-03-23 Andrew Cagney <cagney@redhat.com>
* gdbint.texinfo (Target Architecture Definition): Deprecate
references to SIGTRAMP_START and SIGTRAMP_END.
2004-03-23 Andrew Cagney <cagney@redhat.com> 2004-03-23 Andrew Cagney <cagney@redhat.com>
* gdbint.texinfo (Target Architecture Definition): Deprecate * gdbint.texinfo (Target Architecture Definition): Deprecate

View File

@ -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 the stack frame of the function already has been destroyed up to the
final `return from function call' instruction. final `return from function call' instruction.
@item SIGTRAMP_START (@var{pc}) @item DEPRECATED_SIGTRAMP_START (@var{pc})
@findex SIGTRAMP_START @findex DEPRECATED_SIGTRAMP_START
@itemx SIGTRAMP_END (@var{pc}) @itemx DEPRECATED_SIGTRAMP_END (@var{pc})
@findex SIGTRAMP_END @findex DEPRECATED_SIGTRAMP_END
Define these to be the start and end address of the @code{sigtramp} for the 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 given @var{pc}. On machines where the address is just a compile time
constant, the macro expansion will typically just ignore the supplied constant, the macro expansion will typically just ignore the supplied

View File

@ -246,8 +246,8 @@ struct gdbarch
gdbarch_in_solib_call_trampoline_ftype *in_solib_call_trampoline; gdbarch_in_solib_call_trampoline_ftype *in_solib_call_trampoline;
gdbarch_in_solib_return_trampoline_ftype *in_solib_return_trampoline; gdbarch_in_solib_return_trampoline_ftype *in_solib_return_trampoline;
gdbarch_deprecated_pc_in_sigtramp_ftype *deprecated_pc_in_sigtramp; gdbarch_deprecated_pc_in_sigtramp_ftype *deprecated_pc_in_sigtramp;
gdbarch_sigtramp_start_ftype *sigtramp_start; gdbarch_deprecated_sigtramp_start_ftype *deprecated_sigtramp_start;
gdbarch_sigtramp_end_ftype *sigtramp_end; gdbarch_deprecated_sigtramp_end_ftype *deprecated_sigtramp_end;
gdbarch_in_function_epilogue_p_ftype *in_function_epilogue_p; gdbarch_in_function_epilogue_p_ftype *in_function_epilogue_p;
gdbarch_construct_inferior_arguments_ftype *construct_inferior_arguments; gdbarch_construct_inferior_arguments_ftype *construct_inferior_arguments;
gdbarch_elf_make_msymbol_special_ftype *elf_make_msymbol_special; 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_call_trampoline */
0, /* in_solib_return_trampoline */ 0, /* in_solib_return_trampoline */
0, /* deprecated_pc_in_sigtramp */ 0, /* deprecated_pc_in_sigtramp */
0, /* sigtramp_start */ 0, /* deprecated_sigtramp_start */
0, /* sigtramp_end */ 0, /* deprecated_sigtramp_end */
generic_in_function_epilogue_p, /* in_function_epilogue_p */ generic_in_function_epilogue_p, /* in_function_epilogue_p */
construct_inferior_arguments, /* construct_inferior_arguments */ construct_inferior_arguments, /* construct_inferior_arguments */
0, /* elf_make_msymbol_special */ 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_call_trampoline, invalid_p == 0 */
/* Skip verify of in_solib_return_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 deprecated_pc_in_sigtramp, has predicate */
/* Skip verify of sigtramp_start, has predicate */ /* Skip verify of deprecated_sigtramp_start, has predicate */
/* Skip verify of sigtramp_end, has predicate */ /* Skip verify of deprecated_sigtramp_end, has predicate */
/* Skip verify of in_function_epilogue_p, invalid_p == 0 */ /* Skip verify of in_function_epilogue_p, invalid_p == 0 */
/* Skip verify of construct_inferior_arguments, invalid_p == 0 */ /* Skip verify of construct_inferior_arguments, invalid_p == 0 */
/* Skip verify of elf_make_msymbol_special, 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 (long) current_gdbarch->deprecated_save_dummy_frame_tos
/*DEPRECATED_SAVE_DUMMY_FRAME_TOS ()*/); /*DEPRECATED_SAVE_DUMMY_FRAME_TOS ()*/);
#endif #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 #ifdef DEPRECATED_SIZEOF_CALL_DUMMY_WORDS
fprintf_unfiltered (file, fprintf_unfiltered (file,
"gdbarch_dump: DEPRECATED_SIZEOF_CALL_DUMMY_WORDS # %s\n", "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 (long) current_gdbarch->sdb_reg_to_regnum
/*SDB_REG_TO_REGNUM ()*/); /*SDB_REG_TO_REGNUM ()*/);
#endif #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 #ifdef SKIP_PROLOGUE
fprintf_unfiltered (file, fprintf_unfiltered (file,
"gdbarch_dump: %s # %s\n", "gdbarch_dump: %s # %s\n",
@ -5088,51 +5088,51 @@ set_gdbarch_deprecated_pc_in_sigtramp (struct gdbarch *gdbarch,
} }
int int
gdbarch_sigtramp_start_p (struct gdbarch *gdbarch) gdbarch_deprecated_sigtramp_start_p (struct gdbarch *gdbarch)
{ {
gdb_assert (gdbarch != NULL); gdb_assert (gdbarch != NULL);
return gdbarch->sigtramp_start != NULL; return gdbarch->deprecated_sigtramp_start != NULL;
} }
CORE_ADDR 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 != NULL);
gdb_assert (gdbarch->sigtramp_start != NULL); gdb_assert (gdbarch->deprecated_sigtramp_start != NULL);
if (gdbarch_debug >= 2) if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_sigtramp_start called\n"); fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_sigtramp_start called\n");
return gdbarch->sigtramp_start (pc); return gdbarch->deprecated_sigtramp_start (pc);
} }
void void
set_gdbarch_sigtramp_start (struct gdbarch *gdbarch, set_gdbarch_deprecated_sigtramp_start (struct gdbarch *gdbarch,
gdbarch_sigtramp_start_ftype sigtramp_start) gdbarch_deprecated_sigtramp_start_ftype deprecated_sigtramp_start)
{ {
gdbarch->sigtramp_start = sigtramp_start; gdbarch->deprecated_sigtramp_start = deprecated_sigtramp_start;
} }
int int
gdbarch_sigtramp_end_p (struct gdbarch *gdbarch) gdbarch_deprecated_sigtramp_end_p (struct gdbarch *gdbarch)
{ {
gdb_assert (gdbarch != NULL); gdb_assert (gdbarch != NULL);
return gdbarch->sigtramp_end != NULL; return gdbarch->deprecated_sigtramp_end != NULL;
} }
CORE_ADDR 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 != NULL);
gdb_assert (gdbarch->sigtramp_end != NULL); gdb_assert (gdbarch->deprecated_sigtramp_end != NULL);
if (gdbarch_debug >= 2) if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_sigtramp_end called\n"); fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_sigtramp_end called\n");
return gdbarch->sigtramp_end (pc); return gdbarch->deprecated_sigtramp_end (pc);
} }
void void
set_gdbarch_sigtramp_end (struct gdbarch *gdbarch, set_gdbarch_deprecated_sigtramp_end (struct gdbarch *gdbarch,
gdbarch_sigtramp_end_ftype sigtramp_end) gdbarch_deprecated_sigtramp_end_ftype deprecated_sigtramp_end)
{ {
gdbarch->sigtramp_end = sigtramp_end; gdbarch->deprecated_sigtramp_end = deprecated_sigtramp_end;
} }
int int

View File

@ -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)) #define IN_SOLIB_RETURN_TRAMPOLINE(pc, name) (gdbarch_in_solib_return_trampoline (current_gdbarch, pc, name))
#endif #endif
/* Sigtramp is a routine that the kernel calls (which then calls the /* NOTE: cagney/2004-03-23: DEPRECATED_SIGTRAMP_START,
signal handler). On most machines it is a library routine that is DEPRECATED_SIGTRAMP_END, and DEPRECATED_PC_IN_SIGTRAMP have all been
linked into the executable. superseeded by signal trampoline frame sniffers. */
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. */
#if defined (DEPRECATED_PC_IN_SIGTRAMP) #if defined (DEPRECATED_PC_IN_SIGTRAMP)
/* Legacy for systems yet to multi-arch 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)) #define DEPRECATED_PC_IN_SIGTRAMP(pc, name) (gdbarch_deprecated_pc_in_sigtramp (current_gdbarch, pc, name))
#endif #endif
#if defined (SIGTRAMP_START) #if defined (DEPRECATED_SIGTRAMP_START)
/* Legacy for systems yet to multi-arch SIGTRAMP_START */ /* Legacy for systems yet to multi-arch DEPRECATED_SIGTRAMP_START */
#if !defined (SIGTRAMP_START_P) #if !defined (DEPRECATED_SIGTRAMP_START_P)
#define SIGTRAMP_START_P() (1) #define DEPRECATED_SIGTRAMP_START_P() (1)
#endif #endif
#endif #endif
extern int gdbarch_sigtramp_start_p (struct gdbarch *gdbarch); extern int gdbarch_deprecated_sigtramp_start_p (struct gdbarch *gdbarch);
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SIGTRAMP_START_P) #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_SIGTRAMP_START_P)
#error "Non multi-arch definition of SIGTRAMP_START" #error "Non multi-arch definition of DEPRECATED_SIGTRAMP_START"
#endif #endif
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (SIGTRAMP_START_P) #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_SIGTRAMP_START_P)
#define SIGTRAMP_START_P() (gdbarch_sigtramp_start_p (current_gdbarch)) #define DEPRECATED_SIGTRAMP_START_P() (gdbarch_deprecated_sigtramp_start_p (current_gdbarch))
#endif #endif
typedef CORE_ADDR (gdbarch_sigtramp_start_ftype) (CORE_ADDR pc); typedef CORE_ADDR (gdbarch_deprecated_sigtramp_start_ftype) (CORE_ADDR pc);
extern CORE_ADDR gdbarch_sigtramp_start (struct gdbarch *gdbarch, CORE_ADDR pc); extern CORE_ADDR gdbarch_deprecated_sigtramp_start (struct gdbarch *gdbarch, CORE_ADDR pc);
extern void set_gdbarch_sigtramp_start (struct gdbarch *gdbarch, gdbarch_sigtramp_start_ftype *sigtramp_start); 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 (SIGTRAMP_START) #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_SIGTRAMP_START)
#error "Non multi-arch definition of SIGTRAMP_START" #error "Non multi-arch definition of DEPRECATED_SIGTRAMP_START"
#endif #endif
#if !defined (SIGTRAMP_START) #if !defined (DEPRECATED_SIGTRAMP_START)
#define SIGTRAMP_START(pc) (gdbarch_sigtramp_start (current_gdbarch, pc)) #define DEPRECATED_SIGTRAMP_START(pc) (gdbarch_deprecated_sigtramp_start (current_gdbarch, pc))
#endif #endif
#if defined (SIGTRAMP_END) #if defined (DEPRECATED_SIGTRAMP_END)
/* Legacy for systems yet to multi-arch SIGTRAMP_END */ /* Legacy for systems yet to multi-arch DEPRECATED_SIGTRAMP_END */
#if !defined (SIGTRAMP_END_P) #if !defined (DEPRECATED_SIGTRAMP_END_P)
#define SIGTRAMP_END_P() (1) #define DEPRECATED_SIGTRAMP_END_P() (1)
#endif #endif
#endif #endif
extern int gdbarch_sigtramp_end_p (struct gdbarch *gdbarch); extern int gdbarch_deprecated_sigtramp_end_p (struct gdbarch *gdbarch);
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SIGTRAMP_END_P) #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_SIGTRAMP_END_P)
#error "Non multi-arch definition of SIGTRAMP_END" #error "Non multi-arch definition of DEPRECATED_SIGTRAMP_END"
#endif #endif
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (SIGTRAMP_END_P) #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_SIGTRAMP_END_P)
#define SIGTRAMP_END_P() (gdbarch_sigtramp_end_p (current_gdbarch)) #define DEPRECATED_SIGTRAMP_END_P() (gdbarch_deprecated_sigtramp_end_p (current_gdbarch))
#endif #endif
typedef CORE_ADDR (gdbarch_sigtramp_end_ftype) (CORE_ADDR pc); typedef CORE_ADDR (gdbarch_deprecated_sigtramp_end_ftype) (CORE_ADDR pc);
extern CORE_ADDR gdbarch_sigtramp_end (struct gdbarch *gdbarch, CORE_ADDR pc); extern CORE_ADDR gdbarch_deprecated_sigtramp_end (struct gdbarch *gdbarch, CORE_ADDR pc);
extern void set_gdbarch_sigtramp_end (struct gdbarch *gdbarch, gdbarch_sigtramp_end_ftype *sigtramp_end); 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 (SIGTRAMP_END) #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_SIGTRAMP_END)
#error "Non multi-arch definition of SIGTRAMP_END" #error "Non multi-arch definition of DEPRECATED_SIGTRAMP_END"
#endif #endif
#if !defined (SIGTRAMP_END) #if !defined (DEPRECATED_SIGTRAMP_END)
#define SIGTRAMP_END(pc) (gdbarch_sigtramp_end (current_gdbarch, pc)) #define DEPRECATED_SIGTRAMP_END(pc) (gdbarch_deprecated_sigtramp_end (current_gdbarch, pc))
#endif #endif
/* A target might have problems with watchpoints as soon as the stack /* A target might have problems with watchpoints as soon as the stack

View File

@ -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. # 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 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 # NOTE: cagney/2004-03-23: DEPRECATED_SIGTRAMP_START,
# signal handler). On most machines it is a library routine that is # DEPRECATED_SIGTRAMP_END, and DEPRECATED_PC_IN_SIGTRAMP have all been
# linked into the executable. # superseeded by signal trampoline frame sniffers.
#
# 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.
F::DEPRECATED_PC_IN_SIGTRAMP:int:deprecated_pc_in_sigtramp:CORE_ADDR pc, char *name:pc, name:::legacy_pc_in_sigtramp 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:DEPRECATED_SIGTRAMP_START:CORE_ADDR:deprecated_sigtramp_start:CORE_ADDR pc:pc
F:2:SIGTRAMP_END:CORE_ADDR:sigtramp_end: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 # A target might have problems with watchpoints as soon as the stack
# frame of the current function has been destroyed. This mostly happens # frame of the current function has been destroyed. This mostly happens
# as the first action in a funtion's epilogue. in_function_epilogue_p() # as the first action in a funtion's epilogue. in_function_epilogue_p()

View File

@ -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); set_gdbarch_deprecated_pc_in_sigtramp (gdbarch, i386bsd_pc_in_sigtramp);
/* Allow the recognition of sigtramps as a function named <sigtramp>. */ /* Allow the recognition of sigtramps as a function named <sigtramp>. */
set_gdbarch_sigtramp_start (gdbarch, i386bsd_sigtramp_start); set_gdbarch_deprecated_sigtramp_start (gdbarch, i386bsd_sigtramp_start);
set_gdbarch_sigtramp_end (gdbarch, i386bsd_sigtramp_end); set_gdbarch_deprecated_sigtramp_end (gdbarch, i386bsd_sigtramp_end);
/* Assume SunOS-style shared libraries. */ /* Assume SunOS-style shared libraries. */
set_gdbarch_in_solib_call_trampoline (gdbarch, set_gdbarch_in_solib_call_trampoline (gdbarch,

View File

@ -229,8 +229,8 @@ i386nbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
/* FIXME: kettenis/20020906: We should probably provide /* FIXME: kettenis/20020906: We should probably provide
NetBSD-specific versions of these functions if we want to NetBSD-specific versions of these functions if we want to
recognize signal trampolines that live on the stack. */ recognize signal trampolines that live on the stack. */
set_gdbarch_sigtramp_start (gdbarch, NULL); set_gdbarch_deprecated_sigtramp_start (gdbarch, NULL);
set_gdbarch_sigtramp_end (gdbarch, NULL); set_gdbarch_deprecated_sigtramp_end (gdbarch, NULL);
/* NetBSD uses -freg-struct-return by default. */ /* NetBSD uses -freg-struct-return by default. */
tdep->struct_return = reg_struct_return; tdep->struct_return = reg_struct_return;

View File

@ -216,8 +216,8 @@ i386obsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
tdep->sigtramp_start = i386obsd_sigtramp_start_addr; tdep->sigtramp_start = i386obsd_sigtramp_start_addr;
tdep->sigtramp_end = i386obsd_sigtramp_end_addr; tdep->sigtramp_end = i386obsd_sigtramp_end_addr;
set_gdbarch_deprecated_pc_in_sigtramp (gdbarch, i386obsd_pc_in_sigtramp); set_gdbarch_deprecated_pc_in_sigtramp (gdbarch, i386obsd_pc_in_sigtramp);
set_gdbarch_sigtramp_start (gdbarch, i386obsd_sigtramp_start); set_gdbarch_deprecated_sigtramp_start (gdbarch, i386obsd_sigtramp_start);
set_gdbarch_sigtramp_end (gdbarch, i386obsd_sigtramp_end); set_gdbarch_deprecated_sigtramp_end (gdbarch, i386obsd_sigtramp_end);
/* OpenBSD has a `struct sigcontext' that's different from the /* OpenBSD has a `struct sigcontext' that's different from the
original 4.3 BSD. */ original 4.3 BSD. */