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

* gdbarch.sh (PC_IN_SIGTRAMP): Change to a function with
	predicate, deprecate.
	* gdbarch.h, gdbarch.c: Re-generate.
	* alpha-linux-tdep.c (alpha_linux_init_abi): Update.
	* alpha-osf1-tdep.c (alpha_osf1_init_abi): Update.
	* alpha-tdep.c (alpha_sigtramp_frame_sniffer): Update.
	* alphafbsd-tdep.c (alphafbsd_init_abi): Update.
	* alphanbsd-tdep.c (alphanbsd_init_abi): Update.
	* amd64-linux-tdep.c (amd64_linux_init_abi): Update.
	* amd64-tdep.c (amd64_sigtramp_frame_sniffer): Update.
	* amd64nbsd-tdep.c (amd64nbsd_init_abi): Update.
	* amd64obsd-tdep.c (amd64obsd_init_abi): Update.
	* arm-tdep.c (arm_sigtramp_unwind_sniffer): Update.
	* blockframe.c (find_pc_partial_function): Update.
	* breakpoint.c (bpstat_what): Update.
	* frame.c (frame_type_from_pc, legacy_get_prev_frame): Update.
	* frv-linux-tdep.c (frv_linux_init_abi): Update.
	* frv-tdep.c (frv_sigtramp_frame_sniffer): Update.
	* hppa-hpux-tdep.c (hppa_hpux_init_abi): Update.
	* i386-interix-tdep.c (i386_interix_init_abi): Update.
	* i386-linux-tdep.c (i386_linux_init_abi): Update.
	* i386-nto-tdep.c (i386nto_init_abi): Update.
	* i386-sol2-tdep.c (i386_sol2_init_abi): Update.
	* i386-tdep.c (i386_sigtramp_frame_sniffer)
	(i386_svr4_init_abi, i386_go32_init_abi, i386_gdbarch_init): Update.
	* i386bsd-tdep.c (i386bsd_init_abi): Update.
	* i386nbsd-tdep.c (i386nbsd_init_abi): Update.
	* i386obsd-tdep.c (i386obsd_init_abi): Update.
	* ia64-tdep.c (ia64_sigtramp_frame_sniffer): Update.
	* infrun.c (pc_in_sigtramp): Update.
	* m68k-tdep.c (m68k_sigtramp_frame_sniffer): Update.
	* m68klinux-tdep.c (m68k_linux_init_abi): Update.
	* mips-tdep.c (mips_gdbarch_init): Update.
	* mipsnbsd-tdep.c (mipsnbsd_init_abi): Update.
	* ppc-linux-tdep.c: Update comment.
	* ppcnbsd-tdep.c (ppcnbsd_init_abi): Update.
	* shnbsd-tdep.c (shnbsd_init_abi): Update.
	* sparc-linux-tdep.c (sparc32_linux_init_abi): Update.
	* sparc-sol2-tdep.c (sparc32_sol2_init_abi): Update.
	* sparc64-sol2-tdep.c (sparc64_sol2_init_abi): Update.
	* sparc64fbsd-tdep.c (sparc64fbsd_init_abi): Update.
	* sparc64nbsd-tdep.c (sparc64nbsd_init_abi): Update.
	* sparc64obsd-tdep.c (sparc64obsd_init_abi): Update.
	* sparcnbsd-tdep.c (sparc32nbsd_init_abi): Update.
	* sparcobsd-tdep.c (sparc32obsd_init_abi): Update.

Index: doc/ChangeLog
2004-03-23  Andrew Cagney  <cagney@redhat.com>

	* gdbint.texinfo (Target Architecture Definition): Deprecate
	references to PC_IN_SIGTRAMP.
This commit is contained in:
Andrew Cagney 2004-03-23 14:48:00 +00:00
parent d2259dd367
commit f561f02630
48 changed files with 197 additions and 104 deletions

View File

@ -1,3 +1,51 @@
2004-03-23 Andrew Cagney <cagney@redhat.com>
* gdbarch.sh (PC_IN_SIGTRAMP): Change to a function with
predicate, deprecate.
* gdbarch.h, gdbarch.c: Re-generate.
* alpha-linux-tdep.c (alpha_linux_init_abi): Update.
* alpha-osf1-tdep.c (alpha_osf1_init_abi): Update.
* alpha-tdep.c (alpha_sigtramp_frame_sniffer): Update.
* alphafbsd-tdep.c (alphafbsd_init_abi): Update.
* alphanbsd-tdep.c (alphanbsd_init_abi): Update.
* amd64-linux-tdep.c (amd64_linux_init_abi): Update.
* amd64-tdep.c (amd64_sigtramp_frame_sniffer): Update.
* amd64nbsd-tdep.c (amd64nbsd_init_abi): Update.
* amd64obsd-tdep.c (amd64obsd_init_abi): Update.
* arm-tdep.c (arm_sigtramp_unwind_sniffer): Update.
* blockframe.c (find_pc_partial_function): Update.
* breakpoint.c (bpstat_what): Update.
* frame.c (frame_type_from_pc, legacy_get_prev_frame): Update.
* frv-linux-tdep.c (frv_linux_init_abi): Update.
* frv-tdep.c (frv_sigtramp_frame_sniffer): Update.
* hppa-hpux-tdep.c (hppa_hpux_init_abi): Update.
* i386-interix-tdep.c (i386_interix_init_abi): Update.
* i386-linux-tdep.c (i386_linux_init_abi): Update.
* i386-nto-tdep.c (i386nto_init_abi): Update.
* i386-sol2-tdep.c (i386_sol2_init_abi): Update.
* i386-tdep.c (i386_sigtramp_frame_sniffer)
(i386_svr4_init_abi, i386_go32_init_abi, i386_gdbarch_init): Update.
* i386bsd-tdep.c (i386bsd_init_abi): Update.
* i386nbsd-tdep.c (i386nbsd_init_abi): Update.
* i386obsd-tdep.c (i386obsd_init_abi): Update.
* ia64-tdep.c (ia64_sigtramp_frame_sniffer): Update.
* infrun.c (pc_in_sigtramp): Update.
* m68k-tdep.c (m68k_sigtramp_frame_sniffer): Update.
* m68klinux-tdep.c (m68k_linux_init_abi): Update.
* mips-tdep.c (mips_gdbarch_init): Update.
* mipsnbsd-tdep.c (mipsnbsd_init_abi): Update.
* ppc-linux-tdep.c: Update comment.
* ppcnbsd-tdep.c (ppcnbsd_init_abi): Update.
* shnbsd-tdep.c (shnbsd_init_abi): Update.
* sparc-linux-tdep.c (sparc32_linux_init_abi): Update.
* sparc-sol2-tdep.c (sparc32_sol2_init_abi): Update.
* sparc64-sol2-tdep.c (sparc64_sol2_init_abi): Update.
* sparc64fbsd-tdep.c (sparc64fbsd_init_abi): Update.
* sparc64nbsd-tdep.c (sparc64nbsd_init_abi): Update.
* sparc64obsd-tdep.c (sparc64obsd_init_abi): Update.
* sparcnbsd-tdep.c (sparc32nbsd_init_abi): Update.
* sparcobsd-tdep.c (sparc32obsd_init_abi): Update.
2004-03-23 Andrew Cagney <cagney@redhat.com>
* tramp-frame.h, tramp-frame.h: New files.

View File

@ -134,7 +134,7 @@ alpha_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
/* Hook into the MDEBUG frame unwinder. */
alpha_mdebug_init_abi (info, gdbarch);
set_gdbarch_pc_in_sigtramp (gdbarch, alpha_linux_pc_in_sigtramp);
set_gdbarch_deprecated_pc_in_sigtramp (gdbarch, alpha_linux_pc_in_sigtramp);
tdep = gdbarch_tdep (gdbarch);
tdep->dynamic_sigtramp_offset = alpha_linux_sigtramp_offset;

View File

@ -54,7 +54,7 @@ alpha_osf1_init_abi (struct gdbarch_info info,
/* Hook into the MDEBUG frame unwinder. */
alpha_mdebug_init_abi (info, gdbarch);
set_gdbarch_pc_in_sigtramp (gdbarch, alpha_osf1_pc_in_sigtramp);
set_gdbarch_deprecated_pc_in_sigtramp (gdbarch, alpha_osf1_pc_in_sigtramp);
/* The next/step support via procfs on OSF1 is broken when running
on multi-processor machines. We need to use software single stepping
instead. */

View File

@ -870,7 +870,7 @@ alpha_sigtramp_frame_sniffer (struct frame_info *next_frame)
/* Otherwise we should be in a signal frame. */
find_pc_partial_function (pc, &name, NULL, NULL);
if (PC_IN_SIGTRAMP (pc, name))
if (DEPRECATED_PC_IN_SIGTRAMP (pc, name))
return &alpha_sigtramp_frame_unwind;
return NULL;

View File

@ -100,7 +100,7 @@ alphafbsd_init_abi (struct gdbarch_info info,
set_gdbarch_use_struct_convention (gdbarch, alphafbsd_use_struct_convention);
set_gdbarch_pc_in_sigtramp (gdbarch, alphafbsd_pc_in_sigtramp);
set_gdbarch_deprecated_pc_in_sigtramp (gdbarch, alphafbsd_pc_in_sigtramp);
tdep->dynamic_sigtramp_offset = alphafbsd_sigtramp_offset;
tdep->sigcontext_addr = alphafbsd_sigcontext_addr;

View File

@ -205,7 +205,7 @@ alphanbsd_init_abi (struct gdbarch_info info,
/* Hook into the MDEBUG frame unwinder. */
alpha_mdebug_init_abi (info, gdbarch);
set_gdbarch_pc_in_sigtramp (gdbarch, alphanbsd_pc_in_sigtramp);
set_gdbarch_deprecated_pc_in_sigtramp (gdbarch, alphanbsd_pc_in_sigtramp);
/* NetBSD/alpha does not provide single step support via ptrace(2); we
must use software single-stepping. */

View File

@ -203,7 +203,7 @@ amd64_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
amd64_init_abi (info, gdbarch);
set_gdbarch_pc_in_sigtramp (gdbarch, amd64_linux_pc_in_sigtramp);
set_gdbarch_deprecated_pc_in_sigtramp (gdbarch, amd64_linux_pc_in_sigtramp);
tdep->sigcontext_addr = amd64_linux_sigcontext_addr;
tdep->sc_reg_offset = amd64_linux_sc_reg_offset;
tdep->sc_num_regs = ARRAY_SIZE (amd64_linux_sc_reg_offset);

View File

@ -968,7 +968,7 @@ amd64_sigtramp_frame_sniffer (struct frame_info *next_frame)
char *name;
find_pc_partial_function (pc, &name, NULL, NULL);
if (PC_IN_SIGTRAMP (pc, name))
if (DEPRECATED_PC_IN_SIGTRAMP (pc, name))
{
gdb_assert (gdbarch_tdep (current_gdbarch)->sigcontext_addr);

View File

@ -98,7 +98,7 @@ amd64nbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
tdep->jb_pc_offset = 7 * 8;
/* NetBSD has its own convention for signal trampolines. */
set_gdbarch_pc_in_sigtramp (gdbarch, nbsd_pc_in_sigtramp);
set_gdbarch_deprecated_pc_in_sigtramp (gdbarch, nbsd_pc_in_sigtramp);
tdep->sigcontext_addr = amd64nbsd_sigcontext_addr;
/* Initialize the array with register offsets in `struct

View File

@ -195,7 +195,7 @@ amd64obsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
tdep->jb_pc_offset = 7 * 8;
set_gdbarch_pc_in_sigtramp (gdbarch, amd64obsd_pc_in_sigtramp);
set_gdbarch_deprecated_pc_in_sigtramp (gdbarch, amd64obsd_pc_in_sigtramp);
tdep->sigcontext_addr = amd64obsd_sigcontext_addr;
tdep->sc_reg_offset = amd64obsd_sc_reg_offset;
tdep->sc_num_regs = ARRAY_SIZE (amd64obsd_sc_reg_offset);

View File

@ -1144,13 +1144,13 @@ struct frame_unwind arm_sigtramp_unwind = {
static const struct frame_unwind *
arm_sigtramp_unwind_sniffer (struct frame_info *next_frame)
{
/* Note: If an ARM PC_IN_SIGTRAMP method ever needs to compare
against the name of the function, the code below will have to be
changed to first fetch the name of the function and then pass
this name to PC_IN_SIGTRAMP. */
/* Note: If an ARM DEPRECATED_PC_IN_SIGTRAMP method ever needs to
compare against the name of the function, the code below will
have to be changed to first fetch the name of the function and
then pass this name to DEPRECATED_PC_IN_SIGTRAMP. */
if (SIGCONTEXT_REGISTER_ADDRESS_P ()
&& PC_IN_SIGTRAMP (frame_pc_unwind (next_frame), (char *) 0))
&& DEPRECATED_PC_IN_SIGTRAMP (frame_pc_unwind (next_frame), (char *) 0))
return &arm_sigtramp_unwind;
return NULL;

View File

@ -382,7 +382,8 @@ 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 () && PC_IN_SIGTRAMP (mapped_pc, (char *) NULL))
if (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);

View File

@ -3017,7 +3017,8 @@ bpstat_what (bpstat bs)
/* step_resume entries: a step resume breakpoint overrides another
breakpoint of signal handling (see comment in wait_for_inferior
at first PC_IN_SIGTRAMP where we set the step_resume breakpoint). */
at first DEPRECATED_PC_IN_SIGTRAMP where we set the step_resume
breakpoint). */
/* We handle the through_sigtramp_breakpoint the same way; having both
one of those and a step_resume_breakpoint is probably very rare (?). */

View File

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

View File

@ -3636,8 +3636,8 @@ them.
@findex PCC_SOL_BROKEN
(Used only in the Convex target.)
@item PC_IN_SIGTRAMP (@var{pc}, @var{name})
@findex PC_IN_SIGTRAMP
@item DEPRECATED_PC_IN_SIGTRAMP (@var{pc}, @var{name})
@findex DEPRECATED_PC_IN_SIGTRAMP
@cindex sigtramp
The @dfn{sigtramp} is a routine that the kernel calls (which then calls
the signal handler). On most machines it is a library routine that is

View File

@ -1161,7 +1161,7 @@ frame_type_from_pc (CORE_ADDR pc)
{
char *name;
find_pc_partial_function (pc, &name, NULL, NULL);
if (PC_IN_SIGTRAMP (pc, name))
if (DEPRECATED_PC_IN_SIGTRAMP (pc, name))
return SIGTRAMP_FRAME;
else
return NORMAL_FRAME;
@ -1696,7 +1696,7 @@ legacy_get_prev_frame (struct frame_info *this_frame)
22). */
char *name;
find_pc_partial_function (get_frame_pc (prev), &name, NULL, NULL);
if (PC_IN_SIGTRAMP (get_frame_pc (prev), name))
if (DEPRECATED_PC_IN_SIGTRAMP (get_frame_pc (prev), name))
prev->type = SIGTRAMP_FRAME;
/* FIXME: cagney/2002-11-11: Leave prev->type alone. Some
architectures are forcing the frame's type in INIT so we

View File

@ -360,7 +360,7 @@ extern enum frame_type get_frame_type (struct frame_info *);
/* FIXME: cagney/2002-11-10: Some targets want to directly mark a
frame as being of a specific type. This shouldn't be necessary.
PC_IN_SIGTRAMP() indicates a SIGTRAMP_FRAME and
DEPRECATED_PC_IN_SIGTRAMP() indicates a SIGTRAMP_FRAME and
DEPRECATED_PC_IN_CALL_DUMMY() indicates a DUMMY_FRAME. I suspect
the real problem here is that get_prev_frame() only sets
initialized after DEPRECATED_INIT_EXTRA_FRAME_INFO as been called.

View File

@ -240,7 +240,7 @@ frv_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
address points to a bit of code on the stack. This function is
used to identify this bit of code as a signal trampoline in order
to support backtracing through calls to signal handlers. */
set_gdbarch_pc_in_sigtramp (gdbarch, frv_linux_pc_in_sigtramp);
set_gdbarch_deprecated_pc_in_sigtramp (gdbarch, frv_linux_pc_in_sigtramp);
frv_set_sigcontext_reg_addr (gdbarch, frv_linux_sigcontext_reg_addr);
}

View File

@ -1448,7 +1448,7 @@ frv_sigtramp_frame_sniffer (struct frame_info *next_frame)
return NULL;
find_pc_partial_function (pc, &name, NULL, NULL);
if (PC_IN_SIGTRAMP (pc, name))
if (DEPRECATED_PC_IN_SIGTRAMP (pc, name))
return &frv_sigtramp_frame_unwind;
return NULL;

View File

@ -245,7 +245,7 @@ struct gdbarch
gdbarch_skip_solib_resolver_ftype *skip_solib_resolver;
gdbarch_in_solib_call_trampoline_ftype *in_solib_call_trampoline;
gdbarch_in_solib_return_trampoline_ftype *in_solib_return_trampoline;
gdbarch_pc_in_sigtramp_ftype *pc_in_sigtramp;
gdbarch_deprecated_pc_in_sigtramp_ftype *deprecated_pc_in_sigtramp;
gdbarch_sigtramp_start_ftype *sigtramp_start;
gdbarch_sigtramp_end_ftype *sigtramp_end;
gdbarch_in_function_epilogue_p_ftype *in_function_epilogue_p;
@ -412,7 +412,7 @@ struct gdbarch startup_gdbarch =
generic_skip_solib_resolver, /* skip_solib_resolver */
0, /* in_solib_call_trampoline */
0, /* in_solib_return_trampoline */
0, /* pc_in_sigtramp */
0, /* deprecated_pc_in_sigtramp */
0, /* sigtramp_start */
0, /* sigtramp_end */
generic_in_function_epilogue_p, /* in_function_epilogue_p */
@ -522,7 +522,7 @@ gdbarch_alloc (const struct gdbarch_info *info,
current_gdbarch->skip_solib_resolver = generic_skip_solib_resolver;
current_gdbarch->in_solib_call_trampoline = generic_in_solib_call_trampoline;
current_gdbarch->in_solib_return_trampoline = generic_in_solib_return_trampoline;
current_gdbarch->pc_in_sigtramp = legacy_pc_in_sigtramp;
current_gdbarch->deprecated_pc_in_sigtramp = legacy_pc_in_sigtramp;
current_gdbarch->in_function_epilogue_p = generic_in_function_epilogue_p;
current_gdbarch->construct_inferior_arguments = construct_inferior_arguments;
current_gdbarch->elf_make_msymbol_special = default_elf_make_msymbol_special;
@ -720,7 +720,7 @@ verify_gdbarch (struct gdbarch *current_gdbarch)
/* Skip verify of skip_solib_resolver, 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 pc_in_sigtramp, 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 in_function_epilogue_p, invalid_p == 0 */
@ -1340,6 +1340,25 @@ gdbarch_dump (struct gdbarch *current_gdbarch, struct ui_file *file)
(long) current_gdbarch->deprecated_pc_in_call_dummy
/*DEPRECATED_PC_IN_CALL_DUMMY ()*/);
#endif
#ifdef DEPRECATED_PC_IN_SIGTRAMP_P
fprintf_unfiltered (file,
"gdbarch_dump: %s # %s\n",
"DEPRECATED_PC_IN_SIGTRAMP_P()",
XSTRING (DEPRECATED_PC_IN_SIGTRAMP_P ()));
fprintf_unfiltered (file,
"gdbarch_dump: DEPRECATED_PC_IN_SIGTRAMP_P() = %d\n",
DEPRECATED_PC_IN_SIGTRAMP_P ());
#endif
#ifdef DEPRECATED_PC_IN_SIGTRAMP
fprintf_unfiltered (file,
"gdbarch_dump: %s # %s\n",
"DEPRECATED_PC_IN_SIGTRAMP(pc, name)",
XSTRING (DEPRECATED_PC_IN_SIGTRAMP (pc, name)));
fprintf_unfiltered (file,
"gdbarch_dump: DEPRECATED_PC_IN_SIGTRAMP = <0x%08lx>\n",
(long) current_gdbarch->deprecated_pc_in_sigtramp
/*DEPRECATED_PC_IN_SIGTRAMP ()*/);
#endif
#ifdef DEPRECATED_POP_FRAME_P
fprintf_unfiltered (file,
"gdbarch_dump: %s # %s\n",
@ -1935,16 +1954,6 @@ gdbarch_dump (struct gdbarch *current_gdbarch, struct ui_file *file)
"gdbarch_dump: PARM_BOUNDARY = %d\n",
PARM_BOUNDARY);
#endif
#ifdef PC_IN_SIGTRAMP
fprintf_unfiltered (file,
"gdbarch_dump: %s # %s\n",
"PC_IN_SIGTRAMP(pc, name)",
XSTRING (PC_IN_SIGTRAMP (pc, name)));
fprintf_unfiltered (file,
"gdbarch_dump: PC_IN_SIGTRAMP = <0x%08lx>\n",
(long) current_gdbarch->pc_in_sigtramp
/*PC_IN_SIGTRAMP ()*/);
#endif
#ifdef PC_REGNUM
fprintf_unfiltered (file,
"gdbarch_dump: PC_REGNUM # %s\n",
@ -5054,20 +5063,28 @@ set_gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch,
}
int
gdbarch_pc_in_sigtramp (struct gdbarch *gdbarch, CORE_ADDR pc, char *name)
gdbarch_deprecated_pc_in_sigtramp_p (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
gdb_assert (gdbarch->pc_in_sigtramp != NULL);
return gdbarch->deprecated_pc_in_sigtramp != legacy_pc_in_sigtramp;
}
int
gdbarch_deprecated_pc_in_sigtramp (struct gdbarch *gdbarch, CORE_ADDR pc, char *name)
{
gdb_assert (gdbarch != NULL);
gdb_assert (gdbarch->deprecated_pc_in_sigtramp != NULL);
/* Do not check predicate: gdbarch->deprecated_pc_in_sigtramp != legacy_pc_in_sigtramp, allow call. */
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_pc_in_sigtramp called\n");
return gdbarch->pc_in_sigtramp (pc, name);
fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_pc_in_sigtramp called\n");
return gdbarch->deprecated_pc_in_sigtramp (pc, name);
}
void
set_gdbarch_pc_in_sigtramp (struct gdbarch *gdbarch,
gdbarch_pc_in_sigtramp_ftype pc_in_sigtramp)
set_gdbarch_deprecated_pc_in_sigtramp (struct gdbarch *gdbarch,
gdbarch_deprecated_pc_in_sigtramp_ftype deprecated_pc_in_sigtramp)
{
gdbarch->pc_in_sigtramp = pc_in_sigtramp;
gdbarch->deprecated_pc_in_sigtramp = deprecated_pc_in_sigtramp;
}
int

View File

@ -2122,22 +2122,40 @@ extern void set_gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch, gdb
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 PC_IN_SIGTRAMP.
This means PC_IN_SIGTRAMP function can't be implemented by doing its
own local NAME lookup.
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: PC_IN_SIGTRAMP is something of a mess.
Some code also depends on SIGTRAMP_START and SIGTRAMP_END but other
does not. */
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. */
typedef int (gdbarch_pc_in_sigtramp_ftype) (CORE_ADDR pc, char *name);
extern int gdbarch_pc_in_sigtramp (struct gdbarch *gdbarch, CORE_ADDR pc, char *name);
extern void set_gdbarch_pc_in_sigtramp (struct gdbarch *gdbarch, gdbarch_pc_in_sigtramp_ftype *pc_in_sigtramp);
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (PC_IN_SIGTRAMP)
#error "Non multi-arch definition of PC_IN_SIGTRAMP"
#if defined (DEPRECATED_PC_IN_SIGTRAMP)
/* Legacy for systems yet to multi-arch DEPRECATED_PC_IN_SIGTRAMP */
#if !defined (DEPRECATED_PC_IN_SIGTRAMP_P)
#define DEPRECATED_PC_IN_SIGTRAMP_P() (1)
#endif
#if !defined (PC_IN_SIGTRAMP)
#define PC_IN_SIGTRAMP(pc, name) (gdbarch_pc_in_sigtramp (current_gdbarch, pc, name))
#endif
extern int gdbarch_deprecated_pc_in_sigtramp_p (struct gdbarch *gdbarch);
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_PC_IN_SIGTRAMP_P)
#error "Non multi-arch definition of DEPRECATED_PC_IN_SIGTRAMP"
#endif
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_PC_IN_SIGTRAMP_P)
#define DEPRECATED_PC_IN_SIGTRAMP_P() (gdbarch_deprecated_pc_in_sigtramp_p (current_gdbarch))
#endif
typedef int (gdbarch_deprecated_pc_in_sigtramp_ftype) (CORE_ADDR pc, char *name);
extern int gdbarch_deprecated_pc_in_sigtramp (struct gdbarch *gdbarch, CORE_ADDR pc, char *name);
extern void set_gdbarch_deprecated_pc_in_sigtramp (struct gdbarch *gdbarch, gdbarch_deprecated_pc_in_sigtramp_ftype *deprecated_pc_in_sigtramp);
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_PC_IN_SIGTRAMP)
#error "Non multi-arch definition of DEPRECATED_PC_IN_SIGTRAMP"
#endif
#if !defined (DEPRECATED_PC_IN_SIGTRAMP)
#define DEPRECATED_PC_IN_SIGTRAMP(pc, name) (gdbarch_deprecated_pc_in_sigtramp (current_gdbarch, pc, name))
#endif
#if defined (SIGTRAMP_START)

View File

@ -736,14 +736,17 @@ f:2:IN_SOLIB_RETURN_TRAMPOLINE:int:in_solib_return_trampoline:CORE_ADDR pc, char
# 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 PC_IN_SIGTRAMP.
# This means PC_IN_SIGTRAMP function can't be implemented by doing its
# own local NAME lookup.
# 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: PC_IN_SIGTRAMP is something of a mess.
# Some code also depends on SIGTRAMP_START and SIGTRAMP_END but other
# does not.
f:2:PC_IN_SIGTRAMP:int:pc_in_sigtramp:CORE_ADDR pc, char *name:pc, name:::legacy_pc_in_sigtramp::0
# 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:2:SIGTRAMP_START:CORE_ADDR:sigtramp_start:CORE_ADDR pc:pc
F:2:SIGTRAMP_END:CORE_ADDR:sigtramp_end:CORE_ADDR pc:pc
# A target might have problems with watchpoints as soon as the stack

View File

@ -151,7 +151,7 @@ hppa64_hpux_frame_find_saved_regs_in_sigtramp (struct frame_info *fi,
static void
hppa_hpux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
set_gdbarch_pc_in_sigtramp (gdbarch, hppa_hpux_pc_in_sigtramp);
set_gdbarch_deprecated_pc_in_sigtramp (gdbarch, hppa_hpux_pc_in_sigtramp);
}
static void

View File

@ -325,7 +325,7 @@ i386_interix_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
tdep->struct_return = reg_struct_return;
tdep->jb_pc_offset = jump_buffer_Eip_offset;
set_gdbarch_pc_in_sigtramp (gdbarch, i386_interix_pc_in_sigtramp);
set_gdbarch_deprecated_pc_in_sigtramp (gdbarch, i386_interix_pc_in_sigtramp);
set_gdbarch_in_solib_call_trampoline (gdbarch,
i386_interix_in_solib_call_trampoline);
set_gdbarch_skip_trampoline_code (gdbarch,

View File

@ -87,9 +87,9 @@ i386_linux_register_reggroup_p (struct gdbarch *gdbarch, int regnum,
It kind of sucks that we have to read memory from the process in
order to identify a signal trampoline, but there doesn't seem to be
any other way. The PC_IN_SIGTRAMP macro in tm-linux.h arranges to
only call us if no function name could be identified, which should
be the case since the code is on the stack.
any other way. The DEPRECATED_PC_IN_SIGTRAMP macro in tm-linux.h
arranges to only call us if no function name could be identified,
which should be the case since the code is on the stack.
Detection of signal trampolines for handlers that set the
SA_RESTORER flag is in general not possible. Unfortunately this is
@ -402,7 +402,7 @@ i386_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
address points to a bit of code on the stack. This function is
used to identify this bit of code as a signal trampoline in order
to support backtracing through calls to signal handlers. */
set_gdbarch_pc_in_sigtramp (gdbarch, i386_linux_pc_in_sigtramp);
set_gdbarch_deprecated_pc_in_sigtramp (gdbarch, i386_linux_pc_in_sigtramp);
/* GNU/Linux uses SVR4-style shared libraries. */
set_solib_svr4_fetch_link_map_offsets

View File

@ -278,7 +278,7 @@ i386nto_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
set_gdbarch_in_solib_call_trampoline (gdbarch, in_plt_section);
set_gdbarch_skip_trampoline_code (gdbarch, find_solib_trampoline_target);
set_gdbarch_pc_in_sigtramp (gdbarch, i386nto_pc_in_sigtramp);
set_gdbarch_deprecated_pc_in_sigtramp (gdbarch, i386nto_pc_in_sigtramp);
tdep->sigcontext_addr = i386nto_sigcontext_addr;
tdep->sc_pc_offset = 56;
tdep->sc_sp_offset = 68;

View File

@ -90,7 +90,7 @@ i386_sol2_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
tdep->sc_num_regs = tdep->gregset_num_regs;
/* Signal trampolines are slightly different from SVR4. */
set_gdbarch_pc_in_sigtramp (gdbarch, i386_sol2_pc_in_sigtramp);
set_gdbarch_deprecated_pc_in_sigtramp (gdbarch, i386_sol2_pc_in_sigtramp);
}

View File

@ -1019,7 +1019,7 @@ i386_sigtramp_frame_sniffer (struct frame_info *next_frame)
return NULL;
find_pc_partial_function (pc, &name, NULL, NULL);
if (PC_IN_SIGTRAMP (pc, name))
if (DEPRECATED_PC_IN_SIGTRAMP (pc, name))
return &i386_sigtramp_frame_unwind;
return NULL;
@ -1785,7 +1785,7 @@ i386_svr4_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
set_gdbarch_in_solib_call_trampoline (gdbarch, in_plt_section);
set_gdbarch_skip_trampoline_code (gdbarch, find_solib_trampoline_target);
set_gdbarch_pc_in_sigtramp (gdbarch, i386_svr4_pc_in_sigtramp);
set_gdbarch_deprecated_pc_in_sigtramp (gdbarch, i386_svr4_pc_in_sigtramp);
tdep->sigcontext_addr = i386_svr4_sigcontext_addr;
tdep->sc_pc_offset = 36 + 14 * 4;
tdep->sc_sp_offset = 36 + 17 * 4;
@ -1800,7 +1800,7 @@ i386_go32_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
set_gdbarch_pc_in_sigtramp (gdbarch, i386_go32_pc_in_sigtramp);
set_gdbarch_deprecated_pc_in_sigtramp (gdbarch, i386_go32_pc_in_sigtramp);
tdep->jb_pc_offset = 36;
}
@ -1993,7 +1993,7 @@ i386_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_decr_pc_after_break (gdbarch, 1);
set_gdbarch_frame_args_skip (gdbarch, 8);
set_gdbarch_pc_in_sigtramp (gdbarch, i386_pc_in_sigtramp);
set_gdbarch_deprecated_pc_in_sigtramp (gdbarch, i386_pc_in_sigtramp);
/* Wire in the MMX registers. */
set_gdbarch_num_pseudo_regs (gdbarch, i386_num_mmx_regs);

View File

@ -112,7 +112,7 @@ i386bsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
set_gdbarch_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>. */
set_gdbarch_sigtramp_start (gdbarch, i386bsd_sigtramp_start);

View File

@ -225,7 +225,7 @@ i386nbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
tdep->sizeof_gregset = 16 * 4;
/* NetBSD has different signal trampoline conventions. */
set_gdbarch_pc_in_sigtramp (gdbarch, i386nbsd_pc_in_sigtramp);
set_gdbarch_deprecated_pc_in_sigtramp (gdbarch, i386nbsd_pc_in_sigtramp);
/* 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. */

View File

@ -215,7 +215,7 @@ i386obsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
/* OpenBSD uses a different memory layout. */
tdep->sigtramp_start = i386obsd_sigtramp_start_addr;
tdep->sigtramp_end = i386obsd_sigtramp_end_addr;
set_gdbarch_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_sigtramp_end (gdbarch, i386obsd_sigtramp_end);

View File

@ -2048,7 +2048,7 @@ ia64_sigtramp_frame_sniffer (struct frame_info *next_frame)
CORE_ADDR pc = frame_pc_unwind (next_frame);
find_pc_partial_function (pc, &name, NULL, NULL);
if (PC_IN_SIGTRAMP (pc, name))
if (DEPRECATED_PC_IN_SIGTRAMP (pc, name))
return &ia64_sigtramp_frame_unwind;
return NULL;

View File

@ -1203,8 +1203,8 @@ context_switch (struct execution_control_state *ecs)
inferior_ptid = ecs->ptid;
}
/* Wrapper for PC_IN_SIGTRAMP that takes care of the need to find the
function's name.
/* Wrapper for DEPRECATED_PC_IN_SIGTRAMP that takes care of the need
to find the function's name.
In a classic example of "left hand VS right hand", "infrun.c" was
trying to improve GDB's performance by caching the result of calls
@ -1233,7 +1233,7 @@ pc_in_sigtramp (CORE_ADDR pc)
{
char *name;
find_pc_partial_function (pc, &name, NULL, NULL);
return PC_IN_SIGTRAMP (pc, name);
return DEPRECATED_PC_IN_SIGTRAMP (pc, name);
}
/* Handle the inferior event in the cases when we just stepped

View File

@ -839,7 +839,7 @@ m68k_sigtramp_frame_sniffer (struct frame_info *next_frame)
return NULL;
find_pc_partial_function (pc, &name, NULL, NULL);
if (PC_IN_SIGTRAMP (pc, name))
if (DEPRECATED_PC_IN_SIGTRAMP (pc, name))
return &m68k_sigtramp_frame_unwind;
return NULL;

View File

@ -296,7 +296,7 @@ m68k_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
set_gdbarch_store_return_value (gdbarch, m68k_linux_store_return_value);
set_gdbarch_deprecated_extract_struct_value_address (gdbarch, m68k_linux_extract_struct_value_address);
set_gdbarch_pc_in_sigtramp (gdbarch, m68k_linux_pc_in_sigtramp);
set_gdbarch_deprecated_pc_in_sigtramp (gdbarch, m68k_linux_pc_in_sigtramp);
/* Shared library handling. */
set_gdbarch_in_solib_call_trampoline (gdbarch, in_plt_section);

View File

@ -5779,7 +5779,7 @@ 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_pc_in_sigtramp (gdbarch, mips_pc_in_sigtramp);
set_gdbarch_deprecated_pc_in_sigtramp (gdbarch, mips_pc_in_sigtramp);
set_gdbarch_print_insn (gdbarch, gdb_print_insn_mips);

View File

@ -345,7 +345,7 @@ static void
mipsnbsd_init_abi (struct gdbarch_info info,
struct gdbarch *gdbarch)
{
set_gdbarch_pc_in_sigtramp (gdbarch, mipsnbsd_pc_in_sigtramp);
set_gdbarch_deprecated_pc_in_sigtramp (gdbarch, mipsnbsd_pc_in_sigtramp);
set_gdbarch_get_longjmp_target (gdbarch, mipsnbsd_get_longjmp_target);

View File

@ -114,8 +114,8 @@ static int ppc_linux_at_sigtramp_return_path (CORE_ADDR pc);
/* Determine if pc is in a signal trampoline...
Ha! That's not what this does at all. wait_for_inferior in
infrun.c calls PC_IN_SIGTRAMP in order to detect entry into a
signal trampoline just after delivery of a signal. But on
infrun.c calls DEPRECATED_PC_IN_SIGTRAMP in order to detect entry
into a signal trampoline just after delivery of a signal. But on
GNU/Linux, signal trampolines are used for the return path only.
The kernel sets things up so that the signal handler is called
directly.
@ -150,11 +150,11 @@ static int ppc_linux_at_sigtramp_return_path (CORE_ADDR pc);
first instruction long after the fact, just in case the observed
behavior is ever fixed.)
PC_IN_SIGTRAMP is called from blockframe.c as well in order to set
the frame's type (if a SIGTRAMP_FRAME). Because of our strange
definition of in_sigtramp below, we can't rely on the frame's type
getting set correctly from within blockframe.c. This is why we
take pains to set it in init_extra_frame_info().
DEPRECATED_PC_IN_SIGTRAMP is called from blockframe.c as well in
order to set the frame's type (if a SIGTRAMP_FRAME). Because of
our strange definition of in_sigtramp below, we can't rely on the
frame's type getting set correctly from within blockframe.c. This
is why we take pains to set it in init_extra_frame_info().
NOTE: cagney/2002-11-10: I suspect the real problem here is that
the get_prev_frame() only initializes the frame's type after the

View File

@ -231,7 +231,7 @@ static void
ppcnbsd_init_abi (struct gdbarch_info info,
struct gdbarch *gdbarch)
{
set_gdbarch_pc_in_sigtramp (gdbarch, ppcnbsd_pc_in_sigtramp);
set_gdbarch_deprecated_pc_in_sigtramp (gdbarch, ppcnbsd_pc_in_sigtramp);
/* For NetBSD, this is an on again, off again thing. Some systems
do use the broken struct convention, and some don't. */
set_gdbarch_return_value (gdbarch, ppcnbsd_return_value);

View File

@ -177,7 +177,7 @@ static void
shnbsd_init_abi (struct gdbarch_info info,
struct gdbarch *gdbarch)
{
set_gdbarch_pc_in_sigtramp (gdbarch, shnbsd_pc_in_sigtramp);
set_gdbarch_deprecated_pc_in_sigtramp (gdbarch, shnbsd_pc_in_sigtramp);
set_solib_svr4_fetch_link_map_offsets (gdbarch,
nbsd_ilp32_solib_svr4_fetch_link_map_offsets);

View File

@ -293,7 +293,7 @@ sparc32_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
set_gdbarch_long_double_bit (gdbarch, 64);
set_gdbarch_long_double_format (gdbarch, &floatformat_ieee_double_big);
set_gdbarch_pc_in_sigtramp (gdbarch, sparc32_linux_pc_in_sigtramp);
set_gdbarch_deprecated_pc_in_sigtramp (gdbarch, sparc32_linux_pc_in_sigtramp);
frame_unwind_append_sniffer (gdbarch, sparc32_linux_sigtramp_frame_sniffer);
set_solib_svr4_fetch_link_map_offsets

View File

@ -185,7 +185,7 @@ sparc32_sol2_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
/* Solaris has kernel-assisted single-stepping support. */
set_gdbarch_software_single_step (gdbarch, NULL);
set_gdbarch_pc_in_sigtramp (gdbarch, sparc_sol2_pc_in_sigtramp);
set_gdbarch_deprecated_pc_in_sigtramp (gdbarch, sparc_sol2_pc_in_sigtramp);
frame_unwind_append_sniffer (gdbarch, sparc32_sol2_sigtramp_frame_sniffer);
}

View File

@ -153,7 +153,7 @@ sparc64_sol2_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
set_gdbarch_pc_in_sigtramp (gdbarch, sparc_sol2_pc_in_sigtramp);
set_gdbarch_deprecated_pc_in_sigtramp (gdbarch, sparc_sol2_pc_in_sigtramp);
frame_unwind_append_sniffer (gdbarch, sparc64_sol2_sigtramp_frame_sniffer);
sparc64_init_abi (info, gdbarch);

View File

@ -208,7 +208,7 @@ sparc64fbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
tdep->fpregset->supply_regset = sparc64fbsd_supply_fpregset;
tdep->sizeof_fpregset = 272;
set_gdbarch_pc_in_sigtramp (gdbarch, sparc64fbsd_pc_in_sigtramp);
set_gdbarch_deprecated_pc_in_sigtramp (gdbarch, sparc64fbsd_pc_in_sigtramp);
frame_unwind_append_sniffer (gdbarch, sparc64fbsd_sigtramp_frame_sniffer);
sparc64_init_abi (info, gdbarch);

View File

@ -235,7 +235,7 @@ sparc64nbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
tdep->fpregset->supply_regset = sparc64nbsd_supply_fpregset;
tdep->sizeof_fpregset = 272;
set_gdbarch_pc_in_sigtramp (gdbarch, sparc64nbsd_pc_in_sigtramp);
set_gdbarch_deprecated_pc_in_sigtramp (gdbarch, sparc64nbsd_pc_in_sigtramp);
frame_unwind_append_sniffer (gdbarch, sparc64nbsd_sigtramp_frame_sniffer);
sparc64_init_abi (info, gdbarch);

View File

@ -189,7 +189,7 @@ sparc64obsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
tdep->gregset->supply_regset = sparc64obsd_supply_gregset;
tdep->sizeof_gregset = 832;
set_gdbarch_pc_in_sigtramp (gdbarch, sparc64obsd_pc_in_sigtramp);
set_gdbarch_deprecated_pc_in_sigtramp (gdbarch, sparc64obsd_pc_in_sigtramp);
frame_unwind_append_sniffer (gdbarch, sparc64obsd_sigtramp_frame_sniffer);
sparc64_init_abi (info, gdbarch);

View File

@ -283,7 +283,7 @@ sparc32nbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
tdep->fpregset->supply_regset = sparc32nbsd_supply_fpregset;
tdep->sizeof_fpregset = 33 * 4;
set_gdbarch_pc_in_sigtramp (gdbarch, sparc32nbsd_pc_in_sigtramp);
set_gdbarch_deprecated_pc_in_sigtramp (gdbarch, sparc32nbsd_pc_in_sigtramp);
frame_unwind_append_sniffer (gdbarch, sparc32nbsd_sigtramp_frame_sniffer);
}

View File

@ -152,7 +152,7 @@ sparc32obsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
set_gdbarch_long_double_bit (gdbarch, 64);
set_gdbarch_long_double_format (gdbarch, &floatformat_ieee_double_big);
set_gdbarch_pc_in_sigtramp (gdbarch, sparc32obsd_pc_in_sigtramp);
set_gdbarch_deprecated_pc_in_sigtramp (gdbarch, sparc32obsd_pc_in_sigtramp);
frame_unwind_append_sniffer (gdbarch, sparc32obsd_sigtramp_frame_sniffer);
set_solib_svr4_fetch_link_map_offsets