From fcf70625fc153c636f89293d48208d39033c2c41 Mon Sep 17 00:00:00 2001 From: Andrew Cagney Date: Sat, 1 May 2004 16:52:30 +0000 Subject: [PATCH] 2004-05-01 Andrew Cagney * gdbarch.sh (DEPRECATED_PC_IN_SIGTRAMP): Delete. * gdbarch.h, gdbarch.c: Re-generate. * shnbsd-tdep.c (shnbsd_init_abi): Do not set pc_in_sigtramp. (shnbsd_pc_in_sigtramp): Delete. * i386-interix-tdep.c (i386_interix_init_abi): Do not set pc_in_sigtramp. * hppa-hpux-tdep.c (hppa_hpux_init_abi): Do not set pc_in_sigtramp. * frame.h: Update comments. * ppc-linux-tdep.c: Update comments. * breakpoint.c (bpstat_what): Update comments. Index: doc/ChangeLog 2004-05-01 Andrew Cagney * gdbint.texinfo (Target Architecture Definition): Delete description of DEPRECATED_PC_IN_SIGTRAMP. --- gdb/ChangeLog | 12 +++++++++++ gdb/breakpoint.c | 3 +-- gdb/doc/ChangeLog | 5 +++++ gdb/doc/gdbint.texinfo | 12 ----------- gdb/frame.h | 1 - gdb/gdbarch.c | 48 ----------------------------------------- gdb/gdbarch.h | 28 ------------------------ gdb/gdbarch.sh | 4 ---- gdb/hppa-hpux-tdep.c | 2 -- gdb/i386-interix-tdep.c | 1 - gdb/ppc-linux-tdep.c | 21 +++++------------- gdb/shnbsd-tdep.c | 9 -------- 12 files changed, 23 insertions(+), 123 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index c2732b81d2e..3e9c708c1ab 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,17 @@ 2004-05-01 Andrew Cagney + * gdbarch.sh (DEPRECATED_PC_IN_SIGTRAMP): Delete. + * gdbarch.h, gdbarch.c: Re-generate. + * shnbsd-tdep.c (shnbsd_init_abi): Do not set pc_in_sigtramp. + (shnbsd_pc_in_sigtramp): Delete. + * i386-interix-tdep.c (i386_interix_init_abi): Do not set + pc_in_sigtramp. + * hppa-hpux-tdep.c (hppa_hpux_init_abi): Do not set + pc_in_sigtramp. + * frame.h: Update comments. + * ppc-linux-tdep.c: Update comments. + * breakpoint.c (bpstat_what): Update comments. + * Makefile.in (m68klinux-tdep.o, m68klinux-nat.o): Fix m68klinux-tdep.o's dependencies, were previously added to m68klinux-nat.o. diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index 95b08144487..16333955c6a 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -3032,8 +3032,7 @@ 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 DEPRECATED_PC_IN_SIGTRAMP where we set the step_resume - breakpoint). */ + at 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 (?). */ diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog index 31b63d5043c..977a00ff756 100644 --- a/gdb/doc/ChangeLog +++ b/gdb/doc/ChangeLog @@ -1,3 +1,8 @@ +2004-05-01 Andrew Cagney + + * gdbint.texinfo (Target Architecture Definition): Delete + description of DEPRECATED_PC_IN_SIGTRAMP. + 2004-04-30 Andrew Cagney * gdbint.texinfo (Target Architecture Definition): Delete diff --git a/gdb/doc/gdbint.texinfo b/gdb/doc/gdbint.texinfo index 72d415e72f1..769c4e11ef7 100644 --- a/gdb/doc/gdbint.texinfo +++ b/gdb/doc/gdbint.texinfo @@ -3626,18 +3626,6 @@ them. @findex PCC_SOL_BROKEN (Used only in the Convex target.) -@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 -linked into the executable. - -This function, given a program counter value in @var{pc} and the -(possibly NULL) name of the function in which that @var{pc} resides, -returns nonzero if the @var{pc} and/or @var{name} show that we are in -sigtramp. - @item PC_LOAD_SEGMENT @findex PC_LOAD_SEGMENT If defined, print information about the load segment for the program diff --git a/gdb/frame.h b/gdb/frame.h index f02499054ad..eb8243d69e9 100644 --- a/gdb/frame.h +++ b/gdb/frame.h @@ -361,7 +361,6 @@ 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. - 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. diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c index a6843ca0185..74a799e1139 100644 --- a/gdb/gdbarch.c +++ b/gdb/gdbarch.c @@ -242,7 +242,6 @@ 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_deprecated_pc_in_sigtramp_ftype *deprecated_pc_in_sigtramp; gdbarch_in_function_epilogue_p_ftype *in_function_epilogue_p; gdbarch_construct_inferior_arguments_ftype *construct_inferior_arguments; gdbarch_elf_make_msymbol_special_ftype *elf_make_msymbol_special; @@ -404,7 +403,6 @@ struct gdbarch startup_gdbarch = generic_skip_solib_resolver, /* skip_solib_resolver */ 0, /* in_solib_call_trampoline */ 0, /* in_solib_return_trampoline */ - 0, /* deprecated_pc_in_sigtramp */ generic_in_function_epilogue_p, /* in_function_epilogue_p */ construct_inferior_arguments, /* construct_inferior_arguments */ 0, /* elf_make_msymbol_special */ @@ -512,7 +510,6 @@ 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->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; @@ -709,7 +706,6 @@ 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 deprecated_pc_in_sigtramp, has predicate */ /* Skip verify of in_function_epilogue_p, invalid_p == 0 */ /* Skip verify of construct_inferior_arguments, invalid_p == 0 */ /* Skip verify of elf_make_msymbol_special, invalid_p == 0 */ @@ -1292,25 +1288,6 @@ 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", @@ -4920,31 +4897,6 @@ set_gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch, gdbarch->in_solib_return_trampoline = in_solib_return_trampoline; } -int -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->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_deprecated_pc_in_sigtramp called\n"); - return gdbarch->deprecated_pc_in_sigtramp (pc, name); -} - -void -set_gdbarch_deprecated_pc_in_sigtramp (struct gdbarch *gdbarch, - gdbarch_deprecated_pc_in_sigtramp_ftype deprecated_pc_in_sigtramp) -{ - gdbarch->deprecated_pc_in_sigtramp = deprecated_pc_in_sigtramp; -} - int gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR addr) { diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h index 033d82fcc48..0ba782c2b3b 100644 --- a/gdb/gdbarch.h +++ b/gdb/gdbarch.h @@ -2064,34 +2064,6 @@ extern void set_gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch, gdb #define IN_SOLIB_RETURN_TRAMPOLINE(pc, name) (gdbarch_in_solib_return_trampoline (current_gdbarch, pc, name)) #endif -/* NOTE: cagney/2004-03-23: DEPRECATED_PC_IN_SIGTRAMP have all been - superseeded by signal trampoline frame sniffers. */ - -#if defined (DEPRECATED_PC_IN_SIGTRAMP) -/* Legacy for systems yet to multi-arch DEPRECATED_PC_IN_SIGTRAMP */ -#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_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 - /* A target might have problems with watchpoints as soon as the stack frame of the current function has been destroyed. This mostly happens as the first action in a funtion's epilogue. in_function_epilogue_p() diff --git a/gdb/gdbarch.sh b/gdb/gdbarch.sh index f13e36cb436..f63dcbbe17d 100755 --- a/gdb/gdbarch.sh +++ b/gdb/gdbarch.sh @@ -719,10 +719,6 @@ f:2:IN_SOLIB_CALL_TRAMPOLINE:int:in_solib_call_trampoline:CORE_ADDR pc, char *na # Some systems also have trampoline code for returning from shared libs. f:2:IN_SOLIB_RETURN_TRAMPOLINE:int:in_solib_return_trampoline:CORE_ADDR pc, char *name:pc, name:::generic_in_solib_return_trampoline::0 -# NOTE: cagney/2004-03-23: DEPRECATED_PC_IN_SIGTRAMP have all been -# superseeded by signal trampoline frame sniffers. -F::DEPRECATED_PC_IN_SIGTRAMP:int:deprecated_pc_in_sigtramp:CORE_ADDR pc, char *name:pc, name:::legacy_pc_in_sigtramp - # A target might have problems with watchpoints as soon as the stack # frame of the current function has been destroyed. This mostly happens # as the first action in a funtion's epilogue. in_function_epilogue_p() diff --git a/gdb/hppa-hpux-tdep.c b/gdb/hppa-hpux-tdep.c index a047d42859e..ad058c2a4ad 100644 --- a/gdb/hppa-hpux-tdep.c +++ b/gdb/hppa-hpux-tdep.c @@ -1227,8 +1227,6 @@ hppa_hpux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch) { struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); - set_gdbarch_deprecated_pc_in_sigtramp (gdbarch, hppa_hpux_pc_in_sigtramp); - if (tdep->bytes_per_address == 4) set_gdbarch_in_solib_call_trampoline (gdbarch, hppa32_hpux_in_solib_call_trampoline); diff --git a/gdb/i386-interix-tdep.c b/gdb/i386-interix-tdep.c index 478ac954df2..4461b8720aa 100644 --- a/gdb/i386-interix-tdep.c +++ b/gdb/i386-interix-tdep.c @@ -322,7 +322,6 @@ 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_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, diff --git a/gdb/ppc-linux-tdep.c b/gdb/ppc-linux-tdep.c index ceb864d0216..d0e82e69b08 100644 --- a/gdb/ppc-linux-tdep.c +++ b/gdb/ppc-linux-tdep.c @@ -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 DEPRECATED_PC_IN_SIGTRAMP in order to detect entry - into a signal trampoline just after delivery of a signal. But on + infrun.c calls get_frame_type() 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. @@ -146,20 +146,9 @@ static int ppc_linux_at_sigtramp_return_path (CORE_ADDR pc); signal is delivered while stepping, the next instruction that would've been stepped over isn't, instead a signal is delivered and the first instruction of the handler is stepped over instead. That - puts us on the second instruction. (I added the test for the - first instruction long after the fact, just in case the observed - behavior is ever fixed.) - - 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 - call to INIT_FRAME_INFO. get_prev_frame() should be fixed, this - code shouldn't be working its way around a bug :-(. */ + puts us on the second instruction. (I added the test for the first + instruction long after the fact, just in case the observed behavior + is ever fixed.) */ int ppc_linux_in_sigtramp (CORE_ADDR pc, char *func_name) diff --git a/gdb/shnbsd-tdep.c b/gdb/shnbsd-tdep.c index 1ed20a124e8..ce67c7ff246 100644 --- a/gdb/shnbsd-tdep.c +++ b/gdb/shnbsd-tdep.c @@ -166,19 +166,10 @@ static struct core_fns shnbsd_elfcore_fns = NULL /* next */ }; -static int -shnbsd_pc_in_sigtramp (CORE_ADDR pc, char *func_name) -{ - /* FIXME: Need to add support for kernel-provided signal trampolines. */ - return (nbsd_pc_in_sigtramp (pc, func_name)); -} - static void shnbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch) { - 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); } -- 2.30.2