diff --git a/gdb/ChangeLog b/gdb/ChangeLog index dafa5bd1a8..2a9c75d781 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,16 @@ +2004-05-01 Andrew Cagney + + * gdbarch.sh (DEPRECATED_SIGTRAMP_START) + (DEPRECATED_SIGTRAMP_END): Delete. + * gdbarch.h, gdbarch.c: Re-generate. + * arch-utils.c (legacy_pc_in_sigtramp): Simplify. + * config/vax/tm-vaxbsd.h: Update copyright. + (DEPRECATED_SIGTRAMP_START, DEPRECATED_SIGTRAMP_END): Delete. + (DEPRECATED_IN_SIGTRAMP): Define. + * config/m68k/tm-nbsd.h: Update copyright. + (DEPRECATED_SIGTRAMP_START, DEPRECATED_SIGTRAMP_END): Delete. + (DEPRECATED_IN_SIGTRAMP): Define. + 2004-05-01 Mark Kettenis * dwarf2-frame.c (read_encoded_value): Handle DW_EH_PE_funcrel diff --git a/gdb/arch-utils.c b/gdb/arch-utils.c index d76a8e40a7..c0e1912ac3 100644 --- a/gdb/arch-utils.c +++ b/gdb/arch-utils.c @@ -298,14 +298,10 @@ generic_register_byte (int regnum) int legacy_pc_in_sigtramp (CORE_ADDR pc, char *name) { -#if !defined (DEPRECATED_IN_SIGTRAMP) - if (DEPRECATED_SIGTRAMP_START_P ()) - return ((pc) >= DEPRECATED_SIGTRAMP_START (pc) - && (pc) < DEPRECATED_SIGTRAMP_END (pc)); - else - return name && strcmp ("_sigtramp", name) == 0; -#else +#if defined (DEPRECATED_IN_SIGTRAMP) return DEPRECATED_IN_SIGTRAMP (pc, name); +#else + return name && strcmp ("_sigtramp", name) == 0; #endif } diff --git a/gdb/config/m68k/tm-nbsd.h b/gdb/config/m68k/tm-nbsd.h index aba8639914..04a5272386 100644 --- a/gdb/config/m68k/tm-nbsd.h +++ b/gdb/config/m68k/tm-nbsd.h @@ -1,5 +1,6 @@ /* Macro definitions for m68k running under NetBSD. - Copyright 1994, 1996, 2001 Free Software Foundation, Inc. + + Copyright 1994, 1996, 2001, 2004 Free Software Foundation, Inc. This file is part of GDB. @@ -32,8 +33,8 @@ #define STACK_END_ADDR USRSTACK /* For NetBSD, sigtramp is 32 bytes before STACK_END_ADDR. */ -#define DEPRECATED_SIGTRAMP_START(pc) (STACK_END_ADDR - 32) -#define DEPRECATED_SIGTRAMP_END(pc) (STACK_END_ADDR) +#define DEPRECATED_IN_SIGTRAMP(PC,FUNC_NAME) \ +((PC) >= (STACK_END_ADDR - 32) && (PC) < (STACK_END_ADDR)) #include "m68k/tm-m68k.h" diff --git a/gdb/config/vax/tm-vaxbsd.h b/gdb/config/vax/tm-vaxbsd.h index 16f08d4465..d9c97467ef 100644 --- a/gdb/config/vax/tm-vaxbsd.h +++ b/gdb/config/vax/tm-vaxbsd.h @@ -1,6 +1,7 @@ /* Definitions to make GDB run on a vax under 4.2bsd. - Copyright 1986, 1987, 1989, 1991, 1993, 1994, 1996, 1998, 1999, 2000, 2002 - Free Software Foundation, Inc. + + Copyright 1986, 1987, 1989, 1991, 1993, 1994, 1996, 1998, 1999, + 2000, 2002, 2004 Free Software Foundation, Inc. This file is part of GDB. @@ -29,7 +30,7 @@ /* On the VAX, sigtramp is in the u area. Can't check the exact addresses because for cross-debugging we don't have VAX include files around. This should be close enough. */ -#define DEPRECATED_SIGTRAMP_START(pc) STACK_END_ADDR -#define DEPRECATED_SIGTRAMP_END(pc) 0x80000000 +#define DEPRECATED_IN_SIGTRAMP(PC,FUNC_NAME) \ +((PC) >= (STACK_END_ADDR) && (PC) < (0x80000000)) #endif /* TM_VAXBSD_H */ diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c index 0f68e84a8e..a6843ca018 100644 --- a/gdb/gdbarch.c +++ b/gdb/gdbarch.c @@ -243,8 +243,6 @@ struct gdbarch gdbarch_in_solib_call_trampoline_ftype *in_solib_call_trampoline; gdbarch_in_solib_return_trampoline_ftype *in_solib_return_trampoline; gdbarch_deprecated_pc_in_sigtramp_ftype *deprecated_pc_in_sigtramp; - gdbarch_deprecated_sigtramp_start_ftype *deprecated_sigtramp_start; - gdbarch_deprecated_sigtramp_end_ftype *deprecated_sigtramp_end; gdbarch_in_function_epilogue_p_ftype *in_function_epilogue_p; gdbarch_construct_inferior_arguments_ftype *construct_inferior_arguments; gdbarch_elf_make_msymbol_special_ftype *elf_make_msymbol_special; @@ -407,8 +405,6 @@ struct gdbarch startup_gdbarch = 0, /* in_solib_call_trampoline */ 0, /* in_solib_return_trampoline */ 0, /* deprecated_pc_in_sigtramp */ - 0, /* deprecated_sigtramp_start */ - 0, /* deprecated_sigtramp_end */ generic_in_function_epilogue_p, /* in_function_epilogue_p */ construct_inferior_arguments, /* construct_inferior_arguments */ 0, /* elf_make_msymbol_special */ @@ -714,8 +710,6 @@ verify_gdbarch (struct gdbarch *current_gdbarch) /* Skip verify of in_solib_call_trampoline, invalid_p == 0 */ /* Skip verify of in_solib_return_trampoline, invalid_p == 0 */ /* Skip verify of deprecated_pc_in_sigtramp, has predicate */ - /* Skip verify of deprecated_sigtramp_start, has predicate */ - /* Skip verify of deprecated_sigtramp_end, has predicate */ /* Skip verify of in_function_epilogue_p, invalid_p == 0 */ /* Skip verify of construct_inferior_arguments, invalid_p == 0 */ /* Skip verify of elf_make_msymbol_special, invalid_p == 0 */ @@ -1581,44 +1575,6 @@ gdbarch_dump (struct gdbarch *current_gdbarch, struct ui_file *file) (long) current_gdbarch->deprecated_save_dummy_frame_tos /*DEPRECATED_SAVE_DUMMY_FRAME_TOS ()*/); #endif -#ifdef DEPRECATED_SIGTRAMP_END_P - fprintf_unfiltered (file, - "gdbarch_dump: %s # %s\n", - "DEPRECATED_SIGTRAMP_END_P()", - XSTRING (DEPRECATED_SIGTRAMP_END_P ())); - fprintf_unfiltered (file, - "gdbarch_dump: DEPRECATED_SIGTRAMP_END_P() = %d\n", - DEPRECATED_SIGTRAMP_END_P ()); -#endif -#ifdef DEPRECATED_SIGTRAMP_END - fprintf_unfiltered (file, - "gdbarch_dump: %s # %s\n", - "DEPRECATED_SIGTRAMP_END(pc)", - XSTRING (DEPRECATED_SIGTRAMP_END (pc))); - fprintf_unfiltered (file, - "gdbarch_dump: DEPRECATED_SIGTRAMP_END = <0x%08lx>\n", - (long) current_gdbarch->deprecated_sigtramp_end - /*DEPRECATED_SIGTRAMP_END ()*/); -#endif -#ifdef DEPRECATED_SIGTRAMP_START_P - fprintf_unfiltered (file, - "gdbarch_dump: %s # %s\n", - "DEPRECATED_SIGTRAMP_START_P()", - XSTRING (DEPRECATED_SIGTRAMP_START_P ())); - fprintf_unfiltered (file, - "gdbarch_dump: DEPRECATED_SIGTRAMP_START_P() = %d\n", - DEPRECATED_SIGTRAMP_START_P ()); -#endif -#ifdef DEPRECATED_SIGTRAMP_START - fprintf_unfiltered (file, - "gdbarch_dump: %s # %s\n", - "DEPRECATED_SIGTRAMP_START(pc)", - XSTRING (DEPRECATED_SIGTRAMP_START (pc))); - fprintf_unfiltered (file, - "gdbarch_dump: DEPRECATED_SIGTRAMP_START = <0x%08lx>\n", - (long) current_gdbarch->deprecated_sigtramp_start - /*DEPRECATED_SIGTRAMP_START ()*/); -#endif #ifdef DEPRECATED_SIZEOF_CALL_DUMMY_WORDS fprintf_unfiltered (file, "gdbarch_dump: DEPRECATED_SIZEOF_CALL_DUMMY_WORDS # %s\n", @@ -4989,54 +4945,6 @@ set_gdbarch_deprecated_pc_in_sigtramp (struct gdbarch *gdbarch, gdbarch->deprecated_pc_in_sigtramp = deprecated_pc_in_sigtramp; } -int -gdbarch_deprecated_sigtramp_start_p (struct gdbarch *gdbarch) -{ - gdb_assert (gdbarch != NULL); - return gdbarch->deprecated_sigtramp_start != NULL; -} - -CORE_ADDR -gdbarch_deprecated_sigtramp_start (struct gdbarch *gdbarch, CORE_ADDR pc) -{ - gdb_assert (gdbarch != NULL); - gdb_assert (gdbarch->deprecated_sigtramp_start != NULL); - if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_sigtramp_start called\n"); - return gdbarch->deprecated_sigtramp_start (pc); -} - -void -set_gdbarch_deprecated_sigtramp_start (struct gdbarch *gdbarch, - gdbarch_deprecated_sigtramp_start_ftype deprecated_sigtramp_start) -{ - gdbarch->deprecated_sigtramp_start = deprecated_sigtramp_start; -} - -int -gdbarch_deprecated_sigtramp_end_p (struct gdbarch *gdbarch) -{ - gdb_assert (gdbarch != NULL); - return gdbarch->deprecated_sigtramp_end != NULL; -} - -CORE_ADDR -gdbarch_deprecated_sigtramp_end (struct gdbarch *gdbarch, CORE_ADDR pc) -{ - gdb_assert (gdbarch != NULL); - gdb_assert (gdbarch->deprecated_sigtramp_end != NULL); - if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_sigtramp_end called\n"); - return gdbarch->deprecated_sigtramp_end (pc); -} - -void -set_gdbarch_deprecated_sigtramp_end (struct gdbarch *gdbarch, - gdbarch_deprecated_sigtramp_end_ftype deprecated_sigtramp_end) -{ - gdbarch->deprecated_sigtramp_end = deprecated_sigtramp_end; -} - int gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR addr) { diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h index b7dfa8f800..033d82fcc4 100644 --- a/gdb/gdbarch.h +++ b/gdb/gdbarch.h @@ -2064,8 +2064,7 @@ 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_SIGTRAMP_START, - DEPRECATED_SIGTRAMP_END, and DEPRECATED_PC_IN_SIGTRAMP have all been +/* NOTE: cagney/2004-03-23: DEPRECATED_PC_IN_SIGTRAMP have all been superseeded by signal trampoline frame sniffers. */ #if defined (DEPRECATED_PC_IN_SIGTRAMP) @@ -2093,56 +2092,6 @@ extern void set_gdbarch_deprecated_pc_in_sigtramp (struct gdbarch *gdbarch, gdba #define DEPRECATED_PC_IN_SIGTRAMP(pc, name) (gdbarch_deprecated_pc_in_sigtramp (current_gdbarch, pc, name)) #endif -#if defined (DEPRECATED_SIGTRAMP_START) -/* Legacy for systems yet to multi-arch DEPRECATED_SIGTRAMP_START */ -#if !defined (DEPRECATED_SIGTRAMP_START_P) -#define DEPRECATED_SIGTRAMP_START_P() (1) -#endif -#endif - -extern int gdbarch_deprecated_sigtramp_start_p (struct gdbarch *gdbarch); -#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_SIGTRAMP_START_P) -#error "Non multi-arch definition of DEPRECATED_SIGTRAMP_START" -#endif -#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_SIGTRAMP_START_P) -#define DEPRECATED_SIGTRAMP_START_P() (gdbarch_deprecated_sigtramp_start_p (current_gdbarch)) -#endif - -typedef CORE_ADDR (gdbarch_deprecated_sigtramp_start_ftype) (CORE_ADDR pc); -extern CORE_ADDR gdbarch_deprecated_sigtramp_start (struct gdbarch *gdbarch, CORE_ADDR pc); -extern void set_gdbarch_deprecated_sigtramp_start (struct gdbarch *gdbarch, gdbarch_deprecated_sigtramp_start_ftype *deprecated_sigtramp_start); -#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_SIGTRAMP_START) -#error "Non multi-arch definition of DEPRECATED_SIGTRAMP_START" -#endif -#if !defined (DEPRECATED_SIGTRAMP_START) -#define DEPRECATED_SIGTRAMP_START(pc) (gdbarch_deprecated_sigtramp_start (current_gdbarch, pc)) -#endif - -#if defined (DEPRECATED_SIGTRAMP_END) -/* Legacy for systems yet to multi-arch DEPRECATED_SIGTRAMP_END */ -#if !defined (DEPRECATED_SIGTRAMP_END_P) -#define DEPRECATED_SIGTRAMP_END_P() (1) -#endif -#endif - -extern int gdbarch_deprecated_sigtramp_end_p (struct gdbarch *gdbarch); -#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_SIGTRAMP_END_P) -#error "Non multi-arch definition of DEPRECATED_SIGTRAMP_END" -#endif -#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_SIGTRAMP_END_P) -#define DEPRECATED_SIGTRAMP_END_P() (gdbarch_deprecated_sigtramp_end_p (current_gdbarch)) -#endif - -typedef CORE_ADDR (gdbarch_deprecated_sigtramp_end_ftype) (CORE_ADDR pc); -extern CORE_ADDR gdbarch_deprecated_sigtramp_end (struct gdbarch *gdbarch, CORE_ADDR pc); -extern void set_gdbarch_deprecated_sigtramp_end (struct gdbarch *gdbarch, gdbarch_deprecated_sigtramp_end_ftype *deprecated_sigtramp_end); -#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_SIGTRAMP_END) -#error "Non multi-arch definition of DEPRECATED_SIGTRAMP_END" -#endif -#if !defined (DEPRECATED_SIGTRAMP_END) -#define DEPRECATED_SIGTRAMP_END(pc) (gdbarch_deprecated_sigtramp_end (current_gdbarch, pc)) -#endif - /* A target might have problems with watchpoints as soon as the stack 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 acb4b9bd2d..f13e36cb43 100755 --- a/gdb/gdbarch.sh +++ b/gdb/gdbarch.sh @@ -719,12 +719,10 @@ 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_SIGTRAMP_START, -# DEPRECATED_SIGTRAMP_END, and DEPRECATED_PC_IN_SIGTRAMP have all been +# 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 -F:2:DEPRECATED_SIGTRAMP_START:CORE_ADDR:deprecated_sigtramp_start:CORE_ADDR pc:pc -F:2:DEPRECATED_SIGTRAMP_END:CORE_ADDR:deprecated_sigtramp_end:CORE_ADDR pc:pc + # A target might have problems with watchpoints as soon as the stack # frame of the current function has been destroyed. This mostly happens # as the first action in a funtion's epilogue. in_function_epilogue_p()