Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [obish] Eliminate SIGTRAMP_START / SIGTRAMP_END
@ 2004-04-30 22:01 Andrew Cagney
  2004-05-01 13:10 ` Andrew Cagney
  0 siblings, 1 reply; 2+ messages in thread
From: Andrew Cagney @ 2004-04-30 22:01 UTC (permalink / raw)
  To: gdb-patches

[-- Attachment #1: Type: text/plain, Size: 275 bytes --]

Hello,

This patch eliminates the deprecated SIGTRAMP_START / SIGTRAMP_END 
macros.  It does use a small slight of hand, the two remaining 
definitions were convered into DEPRECATED_IN_SIGTRAMP macros -- two 
steps forward, one step back.

I'll commit in a day or so,
Andrew

[-- Attachment #2: diffs --]
[-- Type: text/plain, Size: 4596 bytes --]

2004-04-30  Andrew Cagney  <cagney@redhat.com>

	* 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.

Index: arch-utils.c
===================================================================
RCS file: /cvs/src/src/gdb/arch-utils.c,v
retrieving revision 1.114
diff -p -u -r1.114 arch-utils.c
--- arch-utils.c	23 Mar 2004 15:16:39 -0000	1.114
+++ arch-utils.c	30 Apr 2004 21:50:33 -0000
@@ -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
 }
 
Index: gdbarch.sh
===================================================================
RCS file: /cvs/src/src/gdb/gdbarch.sh,v
retrieving revision 1.308
diff -p -u -r1.308 gdbarch.sh
--- gdbarch.sh	30 Apr 2004 14:40:54 -0000	1.308
+++ gdbarch.sh	30 Apr 2004 21:50:34 -0000
@@ -719,12 +719,10 @@ f:2:IN_SOLIB_CALL_TRAMPOLINE:int:in_soli
 # 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()
Index: config/m68k/tm-nbsd.h
===================================================================
RCS file: /cvs/src/src/gdb/config/m68k/tm-nbsd.h,v
retrieving revision 1.6
diff -p -u -r1.6 tm-nbsd.h
--- config/m68k/tm-nbsd.h	23 Mar 2004 15:16:42 -0000	1.6
+++ config/m68k/tm-nbsd.h	30 Apr 2004 21:50:34 -0000
@@ -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.
 
@@ -33,8 +34,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"
 
Index: config/vax/tm-vaxbsd.h
===================================================================
RCS file: /cvs/src/src/gdb/config/vax/tm-vaxbsd.h,v
retrieving revision 1.4
diff -p -u -r1.4 tm-vaxbsd.h
--- config/vax/tm-vaxbsd.h	23 Mar 2004 15:16:42 -0000	1.4
+++ config/vax/tm-vaxbsd.h	30 Apr 2004 21:50:34 -0000
@@ -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 */

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [obish] Eliminate SIGTRAMP_START / SIGTRAMP_END
  2004-04-30 22:01 [obish] Eliminate SIGTRAMP_START / SIGTRAMP_END Andrew Cagney
@ 2004-05-01 13:10 ` Andrew Cagney
  0 siblings, 0 replies; 2+ messages in thread
From: Andrew Cagney @ 2004-05-01 13:10 UTC (permalink / raw)
  To: gdb-patches

> 2004-04-30  Andrew Cagney  <cagney@redhat.com>
> 
> 	* 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.

I've checked this in.

Andrew



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-05-01 13:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-04-30 22:01 [obish] Eliminate SIGTRAMP_START / SIGTRAMP_END Andrew Cagney
2004-05-01 13:10 ` Andrew Cagney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox