From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6980 invoked by alias); 23 Mar 2004 14:48:55 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 6859 invoked from network); 23 Mar 2004 14:48:47 -0000 Received: from unknown (HELO localhost.redhat.com) (66.30.197.194) by sources.redhat.com with SMTP; 23 Mar 2004 14:48:47 -0000 Received: from gnu.org (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id DF00F2B92; Tue, 23 Mar 2004 09:48:46 -0500 (EST) Message-ID: <40604E4E.2050803@gnu.org> Date: Tue, 23 Mar 2004 14:48:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-GB; rv:1.4.1) Gecko/20040217 MIME-Version: 1.0 To: gdb-patches@sources.redhat.com Subject: Re: [patch/rfc] Deprecate PC_IN_SIGTRAMP References: <4057757B.3060306@gnu.org> In-Reply-To: <4057757B.3060306@gnu.org> Content-Type: multipart/mixed; boundary="------------040104070803020302050007" X-SW-Source: 2004-03/txt/msg00517.txt.bz2 This is a multi-part message in MIME format. --------------040104070803020302050007 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-length: 1990 > Hello, > > Per hints in my last few posts, the architecture methods such as: > PC_IN_SIGTRAMP > PC_IN_DUMMY_FRAME > been made obsolete by the frame method: > get_frame_type > Consequently, this patch deprecates PC_IN_SIGTRAMP. > > I should note that architecture code is certainly free to have a local pc_in_sigtramp like function, its just that it isn't needed by core-GDB, and hence doesn't need to be in the architecture vector. > > Ref: [wip/rfc] signal trampoline frames > http://sources.redhat.com/ml/gdb-patches/2004-03/msg00353.html > which will provide a simpler way of implementing signal trampolines. > > Ref: [patch/rfc] Use frame_type for sigtramp test in infrun.c > http://sources.redhat.com/ml/gdb-patches/2004-03/msg00357.html > which eliminates the last few PC_IN_SIGTRAMP calls (well at least for non-legacy architectures). I've checked this in. For reference I've attached the final patch (I missed a few updates :-(). Andrew > Index: doc/ChangeLog > 2004-03-16 Andrew Cagney > > * gdbint.texinfo (Target Architecture Definition): Deprecate > references to PC_IN_SIGTRAMP. > > 2004-03-16 Andrew Cagney > > * gdbarch.sh (PC_IN_SIGTRAMP): Change to a function with > predicate, deprecate. > * gdbarch.h, gdbarch.c: Re-generate. > * ppc-linux-tdep.c: Update comment. > * m68k-tdep.c (m68k_sigtramp_frame_sniffer): Update. > * infrun.c (pc_in_sigtramp): Update. > * ia64-tdep.c (ia64_sigtramp_frame_sniffer): Update. > * i386-tdep.c (i386_sigtramp_frame_sniffer): Update. > * i386-linux-tdep.c: Update. > * frv-tdep.c (frv_sigtramp_frame_sniffer): Update. > * frame.c (frame_type_from_pc, legacy_get_prev_frame): Update. > * breakpoint.c (bpstat_what): Update. > * blockframe.c (find_pc_partial_function): Update. > * arm-tdep.c (arm_sigtramp_unwind_sniffer): Update. > * amd64-tdep.c (amd64_sigtramp_frame_sniffer): Update. > * alpha-tdep.c (alpha_sigtramp_frame_sniffer): Update. > --------------040104070803020302050007 Content-Type: text/plain; name="diffs" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="diffs" Content-length: 44894 2004-03-23 Andrew Cagney * 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 * gdbint.texinfo (Target Architecture Definition): Deprecate references to PC_IN_SIGTRAMP. Index: alpha-linux-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/alpha-linux-tdep.c,v retrieving revision 1.12 diff -u -r1.12 alpha-linux-tdep.c --- alpha-linux-tdep.c 4 Jun 2003 06:22:16 -0000 1.12 +++ alpha-linux-tdep.c 23 Mar 2004 14:37:58 -0000 @@ -134,7 +134,7 @@ /* 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; Index: alpha-osf1-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/alpha-osf1-tdep.c,v retrieving revision 1.16 diff -u -r1.16 alpha-osf1-tdep.c --- alpha-osf1-tdep.c 27 Aug 2003 19:02:03 -0000 1.16 +++ alpha-osf1-tdep.c 23 Mar 2004 14:37:59 -0000 @@ -54,7 +54,7 @@ /* 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. */ Index: alpha-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/alpha-tdep.c,v retrieving revision 1.127 diff -u -r1.127 alpha-tdep.c --- alpha-tdep.c 16 Feb 2004 21:49:21 -0000 1.127 +++ alpha-tdep.c 23 Mar 2004 14:38:00 -0000 @@ -870,7 +870,7 @@ /* 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; Index: alphafbsd-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/alphafbsd-tdep.c,v retrieving revision 1.11 diff -u -r1.11 alphafbsd-tdep.c --- alphafbsd-tdep.c 31 Aug 2003 12:56:42 -0000 1.11 +++ alphafbsd-tdep.c 23 Mar 2004 14:38:00 -0000 @@ -100,7 +100,7 @@ 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; Index: alphanbsd-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/alphanbsd-tdep.c,v retrieving revision 1.18 diff -u -r1.18 alphanbsd-tdep.c --- alphanbsd-tdep.c 20 Feb 2004 18:46:34 -0000 1.18 +++ alphanbsd-tdep.c 23 Mar 2004 14:38:00 -0000 @@ -205,7 +205,7 @@ /* 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. */ Index: amd64-linux-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/amd64-linux-tdep.c,v retrieving revision 1.2 diff -u -r1.2 amd64-linux-tdep.c --- amd64-linux-tdep.c 14 Mar 2004 22:39:26 -0000 1.2 +++ amd64-linux-tdep.c 23 Mar 2004 14:38:00 -0000 @@ -203,7 +203,7 @@ 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); Index: amd64-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/amd64-tdep.c,v retrieving revision 1.4 diff -u -r1.4 amd64-tdep.c --- amd64-tdep.c 14 Mar 2004 21:38:55 -0000 1.4 +++ amd64-tdep.c 23 Mar 2004 14:38:00 -0000 @@ -968,7 +968,7 @@ 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); Index: amd64nbsd-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/amd64nbsd-tdep.c,v retrieving revision 1.5 diff -u -r1.5 amd64nbsd-tdep.c --- amd64nbsd-tdep.c 25 Feb 2004 20:59:12 -0000 1.5 +++ amd64nbsd-tdep.c 23 Mar 2004 14:38:00 -0000 @@ -98,7 +98,7 @@ 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 Index: amd64obsd-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/amd64obsd-tdep.c,v retrieving revision 1.6 diff -u -r1.6 amd64obsd-tdep.c --- amd64obsd-tdep.c 25 Feb 2004 20:59:12 -0000 1.6 +++ amd64obsd-tdep.c 23 Mar 2004 14:38:00 -0000 @@ -195,7 +195,7 @@ 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); Index: arm-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/arm-tdep.c,v retrieving revision 1.167 diff -u -r1.167 arm-tdep.c --- arm-tdep.c 9 Mar 2004 17:08:25 -0000 1.167 +++ arm-tdep.c 23 Mar 2004 14:38:02 -0000 @@ -1144,13 +1144,13 @@ 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; Index: blockframe.c =================================================================== RCS file: /cvs/src/src/gdb/blockframe.c,v retrieving revision 1.94 diff -u -r1.94 blockframe.c --- blockframe.c 22 Mar 2004 01:43:32 -0000 1.94 +++ blockframe.c 23 Mar 2004 14:38:02 -0000 @@ -382,7 +382,8 @@ /* 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); Index: breakpoint.c =================================================================== RCS file: /cvs/src/src/gdb/breakpoint.c,v retrieving revision 1.164 diff -u -r1.164 breakpoint.c --- breakpoint.c 19 Mar 2004 20:49:43 -0000 1.164 +++ breakpoint.c 23 Mar 2004 14:38:06 -0000 @@ -3017,7 +3017,8 @@ /* 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 (?). */ Index: frame.c =================================================================== RCS file: /cvs/src/src/gdb/frame.c,v retrieving revision 1.165 diff -u -r1.165 frame.c --- frame.c 22 Mar 2004 15:36:46 -0000 1.165 +++ frame.c 23 Mar 2004 14:38:06 -0000 @@ -1161,7 +1161,7 @@ { 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 @@ 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 Index: frame.h =================================================================== RCS file: /cvs/src/src/gdb/frame.h,v retrieving revision 1.121 diff -u -r1.121 frame.h --- frame.h 22 Mar 2004 16:58:07 -0000 1.121 +++ frame.h 23 Mar 2004 14:38:07 -0000 @@ -360,7 +360,7 @@ /* 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. Index: frv-linux-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/frv-linux-tdep.c,v retrieving revision 1.1 diff -u -r1.1 frv-linux-tdep.c --- frv-linux-tdep.c 15 Mar 2004 19:42:24 -0000 1.1 +++ frv-linux-tdep.c 23 Mar 2004 14:38:07 -0000 @@ -240,7 +240,7 @@ 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); } Index: frv-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/frv-tdep.c,v retrieving revision 1.79 diff -u -r1.79 frv-tdep.c --- frv-tdep.c 15 Mar 2004 19:42:24 -0000 1.79 +++ frv-tdep.c 23 Mar 2004 14:38:07 -0000 @@ -1448,7 +1448,7 @@ 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; Index: gdbarch.c =================================================================== RCS file: /cvs/src/src/gdb/gdbarch.c,v retrieving revision 1.277 diff -u -r1.277 gdbarch.c --- gdbarch.c 22 Mar 2004 15:36:46 -0000 1.277 +++ gdbarch.c 23 Mar 2004 14:38:08 -0000 @@ -245,7 +245,7 @@ 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 @@ 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 @@ 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 @@ /* 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 @@ (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: 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 @@ } 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); + 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->pc_in_sigtramp != 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 Index: gdbarch.h =================================================================== RCS file: /cvs/src/src/gdb/gdbarch.h,v retrieving revision 1.239 diff -u -r1.239 gdbarch.h --- gdbarch.h 15 Mar 2004 20:38:08 -0000 1.239 +++ gdbarch.h 23 Mar 2004 14:38:09 -0000 @@ -2122,22 +2122,40 @@ 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. */ + +#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 +#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_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" +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 (PC_IN_SIGTRAMP) -#define PC_IN_SIGTRAMP(pc, name) (gdbarch_pc_in_sigtramp (current_gdbarch, pc, name)) +#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) Index: gdbarch.sh =================================================================== RCS file: /cvs/src/src/gdb/gdbarch.sh,v retrieving revision 1.303 diff -u -r1.303 gdbarch.sh --- gdbarch.sh 22 Mar 2004 15:36:47 -0000 1.303 +++ gdbarch.sh 23 Mar 2004 14:38:10 -0000 @@ -736,14 +736,17 @@ # 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 Index: hppa-hpux-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/hppa-hpux-tdep.c,v retrieving revision 1.11 diff -u -r1.11 hppa-hpux-tdep.c --- hppa-hpux-tdep.c 19 Sep 2003 06:14:27 -0000 1.11 +++ hppa-hpux-tdep.c 23 Mar 2004 14:38:10 -0000 @@ -151,7 +151,7 @@ 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 Index: i386-interix-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/i386-interix-tdep.c,v retrieving revision 1.13 diff -u -r1.13 i386-interix-tdep.c --- i386-interix-tdep.c 17 Jan 2004 15:34:11 -0000 1.13 +++ i386-interix-tdep.c 23 Mar 2004 14:38:10 -0000 @@ -325,7 +325,7 @@ 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, Index: i386-linux-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/i386-linux-tdep.c,v retrieving revision 1.36 diff -u -r1.36 i386-linux-tdep.c --- i386-linux-tdep.c 15 Mar 2004 22:38:21 -0000 1.36 +++ i386-linux-tdep.c 23 Mar 2004 14:38:10 -0000 @@ -87,9 +87,9 @@ 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 @@ 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 Index: i386-nto-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/i386-nto-tdep.c,v retrieving revision 1.9 diff -u -r1.9 i386-nto-tdep.c --- i386-nto-tdep.c 6 Feb 2004 18:30:47 -0000 1.9 +++ i386-nto-tdep.c 23 Mar 2004 14:38:10 -0000 @@ -278,7 +278,7 @@ 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; Index: i386-sol2-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/i386-sol2-tdep.c,v retrieving revision 1.13 diff -u -r1.13 i386-sol2-tdep.c --- i386-sol2-tdep.c 28 Dec 2003 19:48:15 -0000 1.13 +++ i386-sol2-tdep.c 23 Mar 2004 14:38:10 -0000 @@ -90,7 +90,7 @@ 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); } Index: i386-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/i386-tdep.c,v retrieving revision 1.180 diff -u -r1.180 i386-tdep.c --- i386-tdep.c 17 Jan 2004 22:45:44 -0000 1.180 +++ i386-tdep.c 23 Mar 2004 14:38:11 -0000 @@ -1019,7 +1019,7 @@ 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 @@ 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 @@ { 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 @@ 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); Index: i386bsd-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/i386bsd-tdep.c,v retrieving revision 1.21 diff -u -r1.21 i386bsd-tdep.c --- i386bsd-tdep.c 5 Mar 2004 21:01:56 -0000 1.21 +++ i386bsd-tdep.c 23 Mar 2004 14:38:11 -0000 @@ -112,7 +112,7 @@ { 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 . */ set_gdbarch_sigtramp_start (gdbarch, i386bsd_sigtramp_start); Index: i386nbsd-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/i386nbsd-tdep.c,v retrieving revision 1.20 diff -u -r1.20 i386nbsd-tdep.c --- i386nbsd-tdep.c 5 Mar 2004 20:58:00 -0000 1.20 +++ i386nbsd-tdep.c 23 Mar 2004 14:38:11 -0000 @@ -225,7 +225,7 @@ 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. */ Index: i386obsd-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/i386obsd-tdep.c,v retrieving revision 1.11 diff -u -r1.11 i386obsd-tdep.c --- i386obsd-tdep.c 5 Mar 2004 20:58:00 -0000 1.11 +++ i386obsd-tdep.c 23 Mar 2004 14:38:11 -0000 @@ -215,7 +215,7 @@ /* 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); Index: ia64-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/ia64-tdep.c,v retrieving revision 1.117 diff -u -r1.117 ia64-tdep.c --- ia64-tdep.c 24 Feb 2004 22:35:01 -0000 1.117 +++ ia64-tdep.c 23 Mar 2004 14:38:12 -0000 @@ -2048,7 +2048,7 @@ 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; Index: infrun.c =================================================================== RCS file: /cvs/src/src/gdb/infrun.c,v retrieving revision 1.141 diff -u -r1.141 infrun.c --- infrun.c 21 Mar 2004 22:53:49 -0000 1.141 +++ infrun.c 23 Mar 2004 14:38:13 -0000 @@ -1203,8 +1203,8 @@ 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 @@ { 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 Index: m68k-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/m68k-tdep.c,v retrieving revision 1.80 diff -u -r1.80 m68k-tdep.c --- m68k-tdep.c 16 Feb 2004 21:49:22 -0000 1.80 +++ m68k-tdep.c 23 Mar 2004 14:38:14 -0000 @@ -839,7 +839,7 @@ 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; Index: m68klinux-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/m68klinux-tdep.c,v retrieving revision 1.9 diff -u -r1.9 m68klinux-tdep.c --- m68klinux-tdep.c 26 Jan 2004 20:52:11 -0000 1.9 +++ m68klinux-tdep.c 23 Mar 2004 14:38:14 -0000 @@ -296,7 +296,7 @@ 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); Index: mips-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/mips-tdep.c,v retrieving revision 1.284 diff -u -r1.284 mips-tdep.c --- mips-tdep.c 22 Mar 2004 21:39:00 -0000 1.284 +++ mips-tdep.c 23 Mar 2004 14:38:16 -0000 @@ -5779,7 +5779,7 @@ 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); Index: mipsnbsd-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/mipsnbsd-tdep.c,v retrieving revision 1.9 diff -u -r1.9 mipsnbsd-tdep.c --- mipsnbsd-tdep.c 21 Mar 2004 22:34:11 -0000 1.9 +++ mipsnbsd-tdep.c 23 Mar 2004 14:38:16 -0000 @@ -345,7 +345,7 @@ 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); Index: ppc-linux-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/ppc-linux-tdep.c,v retrieving revision 1.53 diff -u -r1.53 ppc-linux-tdep.c --- ppc-linux-tdep.c 20 Mar 2004 04:58:13 -0000 1.53 +++ ppc-linux-tdep.c 23 Mar 2004 14:38:16 -0000 @@ -114,8 +114,8 @@ /* 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 @@ 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 Index: ppcnbsd-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/ppcnbsd-tdep.c,v retrieving revision 1.11 diff -u -r1.11 ppcnbsd-tdep.c --- ppcnbsd-tdep.c 10 Nov 2003 22:47:28 -0000 1.11 +++ ppcnbsd-tdep.c 23 Mar 2004 14:38:16 -0000 @@ -231,7 +231,7 @@ 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); Index: shnbsd-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/shnbsd-tdep.c,v retrieving revision 1.9 diff -u -r1.9 shnbsd-tdep.c --- shnbsd-tdep.c 4 Jan 2003 23:38:45 -0000 1.9 +++ shnbsd-tdep.c 23 Mar 2004 14:38:16 -0000 @@ -177,7 +177,7 @@ 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); Index: sparc-linux-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/sparc-linux-tdep.c,v retrieving revision 1.2 diff -u -r1.2 sparc-linux-tdep.c --- sparc-linux-tdep.c 3 Jan 2004 10:08:44 -0000 1.2 +++ sparc-linux-tdep.c 23 Mar 2004 14:38:16 -0000 @@ -293,7 +293,7 @@ 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 Index: sparc-sol2-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/sparc-sol2-tdep.c,v retrieving revision 1.2 diff -u -r1.2 sparc-sol2-tdep.c --- sparc-sol2-tdep.c 3 Jan 2004 10:08:44 -0000 1.2 +++ sparc-sol2-tdep.c 23 Mar 2004 14:38:16 -0000 @@ -185,7 +185,7 @@ /* 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); } Index: sparc64-sol2-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/sparc64-sol2-tdep.c,v retrieving revision 1.2 diff -u -r1.2 sparc64-sol2-tdep.c --- sparc64-sol2-tdep.c 3 Jan 2004 10:08:44 -0000 1.2 +++ sparc64-sol2-tdep.c 23 Mar 2004 14:38:16 -0000 @@ -153,7 +153,7 @@ { 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); Index: sparc64fbsd-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/sparc64fbsd-tdep.c,v retrieving revision 1.4 diff -u -r1.4 sparc64fbsd-tdep.c --- sparc64fbsd-tdep.c 11 Jan 2004 20:02:18 -0000 1.4 +++ sparc64fbsd-tdep.c 23 Mar 2004 14:38:16 -0000 @@ -208,7 +208,7 @@ 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); Index: sparc64nbsd-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/sparc64nbsd-tdep.c,v retrieving revision 1.5 diff -u -r1.5 sparc64nbsd-tdep.c --- sparc64nbsd-tdep.c 24 Jan 2004 22:18:21 -0000 1.5 +++ sparc64nbsd-tdep.c 23 Mar 2004 14:38:16 -0000 @@ -235,7 +235,7 @@ 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); Index: sparc64obsd-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/sparc64obsd-tdep.c,v retrieving revision 1.1 diff -u -r1.1 sparc64obsd-tdep.c --- sparc64obsd-tdep.c 24 Jan 2004 22:18:21 -0000 1.1 +++ sparc64obsd-tdep.c 23 Mar 2004 14:38:16 -0000 @@ -189,7 +189,7 @@ 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); Index: sparcnbsd-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/sparcnbsd-tdep.c,v retrieving revision 1.15 diff -u -r1.15 sparcnbsd-tdep.c --- sparcnbsd-tdep.c 7 Feb 2004 20:45:40 -0000 1.15 +++ sparcnbsd-tdep.c 23 Mar 2004 14:38:17 -0000 @@ -283,7 +283,7 @@ 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); } Index: sparcobsd-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/sparcobsd-tdep.c,v retrieving revision 1.1 diff -u -r1.1 sparcobsd-tdep.c --- sparcobsd-tdep.c 25 Jan 2004 11:46:44 -0000 1.1 +++ sparcobsd-tdep.c 23 Mar 2004 14:38:17 -0000 @@ -152,7 +152,7 @@ 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 Index: doc/gdbint.texinfo =================================================================== RCS file: /cvs/src/src/gdb/doc/gdbint.texinfo,v retrieving revision 1.192 diff -u -r1.192 gdbint.texinfo --- doc/gdbint.texinfo 19 Mar 2004 17:43:34 -0000 1.192 +++ doc/gdbint.texinfo 23 Mar 2004 14:38:21 -0000 @@ -3636,8 +3636,8 @@ @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 --------------040104070803020302050007--