This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[patch/rfc] Always define PC_IN_CALL_DUMMY et.al.
- From: Andrew Cagney <ac131313 at redhat dot com>
- To: gdb-patches at sources dot redhat dot com,Joel Brobecker <brobecker at gnat dot com>
- Date: Sun, 24 Nov 2002 22:53:58 -0500
- Subject: [patch/rfc] Always define PC_IN_CALL_DUMMY et.al.
Hello,
The attached tries to ensure that all targets always specify
PC_IN_CALL_DUMMY, USE_GENERIC_DUMMY_FRAMES and CALL_DUMMY_LOCATION.
This is pretty straight forward, just define them in the non multi-arch,
non generic dummy frame (hp/pa, mn10200, z8k). The only tricky one is
the sparc (which is a bit of a mess) a but I'm pretty sure I've got it
right.
I'll look to commit this one in a few days.
(This is a first step in eliminating some of the generic dummy frame
methods. Namely PC_IN_CALL_DUMMY and USE_GENERIC_DUMMY_FRAMES).
(joel, note the hp/pa code)
Andrew
2002-11-24 Andrew Cagney <ac131313@redhat.com>
* config/h8500/tm-h8500.h (CALL_DUMMY_LOCATION): Define as ON_STACK.
(USE_GENERIC_DUMMY_FRAMES): Define as zero.
(PC_IN_CALL_DUMMY): Define as pc_in_call_dummy_on_stack.
* config/mn10200/tm-mn10200.h (PC_IN_CALL_DUMMY): Define as
pc_in_call_dummy_at_entry_point.
* config/pa/tm-hppa.h (CALL_DUMMY_LOCATION): Define as ON_STACK.
(USE_GENERIC_DUMMY_FRAMES): Define as zero.
(PC_IN_CALL_DUMMY): Define as pc_in_call_dummy_on_stack.
* config/pa/tm-hppa64.h (CALL_DUMMY_LOCATION): Delete undefine.
* config/sparc/tm-sparc.h (PC_IN_CALL_DUMMY): Define as
pc_in_call_dummy_on_stack.
* config/sparc/tm-sp64.h (PC_IN_CALL_DUMMY): Redefine as
pc_in_call_dummy_at_entry_point and pc_in_call_dummy_on_stack.
* config/z8k/tm-z8k.h (CALL_DUMMY_LOCATION): Define as ON_STACK.
(USE_GENERIC_DUMMY_FRAMES): Define as zero.
(PC_IN_CALL_DUMMY): Defile as pc_in_call_dummy_on_stack.
Index: config/h8500/tm-h8500.h
===================================================================
RCS file: /cvs/src/src/gdb/config/h8500/tm-h8500.h,v
retrieving revision 1.15
diff -u -r1.15 tm-h8500.h
--- config/h8500/tm-h8500.h 14 Nov 2002 00:25:04 -0000 1.15
+++ config/h8500/tm-h8500.h 25 Nov 2002 03:36:07 -0000
@@ -22,6 +22,11 @@
#include "regcache.h"
+/* NOTE: cagney/2002-11-24: This is a guess. */
+#define USE_GENERIC_DUMMY_FRAMES 0
+#define CALL_DUMMY_LOCATION ON_STACK
+#define PC_IN_CALL_DUMMY(pc, sp, frame_address) pc_in_call_dummy_on_stack (pc, sp, frame_address)
+
/* Contributed by Steve Chamberlain sac@cygnus.com */
#define GDB_TARGET_IS_H8500
Index: config/mn10200/tm-mn10200.h
===================================================================
RCS file: /cvs/src/src/gdb/config/mn10200/tm-mn10200.h,v
retrieving revision 1.14
diff -u -r1.14 tm-mn10200.h
--- config/mn10200/tm-mn10200.h 16 Nov 2002 01:00:07 -0000 1.14
+++ config/mn10200/tm-mn10200.h 25 Nov 2002 03:37:01 -0000
@@ -189,6 +189,7 @@
#define CALL_DUMMY_START_OFFSET (0)
#define CALL_DUMMY_BREAKPOINT_OFFSET (0)
#define CALL_DUMMY_LOCATION AT_ENTRY_POINT
+#define PC_IN_CALL_DUMMY(pc, sp, frame_address) pc_in_call_dummy_at_entry_point (pc, sp, frame_address)
#define FIX_CALL_DUMMY(DUMMY, START, FUNADDR, NARGS, ARGS, TYPE, GCCP)
#define CALL_DUMMY_ADDRESS() entry_point_address ()
Index: config/pa/tm-hppa.h
===================================================================
RCS file: /cvs/src/src/gdb/config/pa/tm-hppa.h,v
retrieving revision 1.21
diff -u -r1.21 tm-hppa.h
--- config/pa/tm-hppa.h 8 Nov 2002 03:35:47 -0000 1.21
+++ config/pa/tm-hppa.h 25 Nov 2002 03:38:56 -0000
@@ -26,6 +26,11 @@
#define GDB_MULTI_ARCH 0
+/* NOTE: cagney/2002-11-24: This is a guess. */
+#define USE_GENERIC_DUMMY_FRAMES 0
+#define CALL_DUMMY_LOCATION ON_STACK
+#define PC_IN_CALL_DUMMY(pc, sp, frame_address) pc_in_call_dummy_on_stack (pc, sp, frame_address)
+
/* Forward declarations of some types we use in prototypes */
struct frame_info;
Index: config/sparc/tm-sp64.h
===================================================================
RCS file: /cvs/src/src/gdb/config/sparc/tm-sp64.h,v
retrieving revision 1.8
diff -u -r1.8 tm-sp64.h
--- config/sparc/tm-sp64.h 14 Jun 2002 22:55:50 -0000 1.8
+++ config/sparc/tm-sp64.h 25 Nov 2002 03:38:57 -0000
@@ -100,6 +100,8 @@
#define CALL_DUMMY_BREAKPOINT_OFFSET_P 1
#undef CALL_DUMMY_LOCATION
#define CALL_DUMMY_LOCATION AT_ENTRY_POINT
+#undef PC_IN_CALL_DUMMY
+#define PC_IN_CALL_DUMMY(pc, sp, frame_address) pc_in_call_dummy_at_entry_point (pc, sp, frame_address)
#undef CALL_DUMMY_STACK_ADJUST
#define CALL_DUMMY_STACK_ADJUST 128
#undef SIZEOF_CALL_DUMMY_WORDS
@@ -168,6 +170,8 @@
/* Call dummy will be located on the stack. */
#undef CALL_DUMMY_LOCATION
#define CALL_DUMMY_LOCATION ON_STACK
+#undef PC_IN_CALL_DUMMY
+#define PC_IN_CALL_DUMMY(pc, sp, frame_address) pc_in_call_dummy_on_stack (pc, sp, frame_address)
/* Insert the function address into the call dummy. */
#undef FIX_CALL_DUMMY
Index: config/sparc/tm-sparc.h
===================================================================
RCS file: /cvs/src/src/gdb/config/sparc/tm-sparc.h,v
retrieving revision 1.19
diff -u -r1.19 tm-sparc.h
--- config/sparc/tm-sparc.h 5 Nov 2002 20:43:36 -0000 1.19
+++ config/sparc/tm-sparc.h 25 Nov 2002 03:42:51 -0000
@@ -657,6 +657,7 @@
/* Call dummy method (eg. on stack, at entry point, etc.) */
#define CALL_DUMMY_LOCATION ON_STACK
+#define PC_IN_CALL_DUMMY(pc, sp, frame_address) pc_in_call_dummy_on_stack (pc, sp, frame_address)
/* Method for detecting dummy frames. */
Index: config/z8k/tm-z8k.h
===================================================================
RCS file: /cvs/src/src/gdb/config/z8k/tm-z8k.h,v
retrieving revision 1.11
diff -u -r1.11 tm-z8k.h
--- config/z8k/tm-z8k.h 31 Oct 2002 19:14:07 -0000 1.11
+++ config/z8k/tm-z8k.h 25 Nov 2002 03:42:51 -0000
@@ -20,6 +20,11 @@
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
+/* NOTE: cagney/2002-11-24: This is a guess. */
+#define USE_GENERIC_DUMMY_FRAMES 0
+#define CALL_DUMMY_LOCATION ON_STACK
+#define PC_IN_CALL_DUMMY(pc, sp, frame_address) pc_in_call_dummy_on_stack (pc, sp, frame_address)
+
#undef TARGET_INT_BIT
#undef TARGET_LONG_BIT
#undef TARGET_SHORT_BIT