Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Andrew Cagney <cagney@gnu.org>
To: gdb-patches@sources.redhat.com
Subject: [obish] Eliminate SIGTRAMP_START / SIGTRAMP_END
Date: Fri, 30 Apr 2004 22:01:00 -0000	[thread overview]
Message-ID: <4092CC9C.4070003@gnu.org> (raw)

[-- 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 */

             reply	other threads:[~2004-04-30 22:01 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-30 22:01 Andrew Cagney [this message]
2004-05-01 13:10 ` Andrew Cagney

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4092CC9C.4070003@gnu.org \
    --to=cagney@gnu.org \
    --cc=gdb-patches@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox