This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFD] How to fix FRAME_CHAIN_VALID redefinition in config/i386/tm-i386v4.h ?
- From: Andrew Cagney <ac131313 at cygnus dot com>
- To: Andrew Cagney <ac131313 at cygnus dot com>
- Cc: "Peter.Schauer" <Peter dot Schauer at regent dot e-technik dot tu-muenchen dot de>,gdb-patches at sources dot redhat dot com
- Date: Sun, 17 Feb 2002 12:23:12 -0500
- Subject: Re: [RFD] How to fix FRAME_CHAIN_VALID redefinition in config/i386/tm-i386v4.h ?
- References: <200202171345.OAA04571@reisser.regent.e-technik.tu-muenchen.de> <3C6FD90E.5000504@cygnus.com>
Peter,
How does the attached look for the immediate problem? You'll need to
run gdbarch.sh and move the files into place.
I'm, to be honest, still testing it.
Andrew
2002-02-17 Andrew Cagney <ac131313@redhat.com>
* gdbarch.sh (FRAME_CHAIN_VALID): Only require at level 2.
Default to func_frame_chain_valid.
* gdbarch.h, gdbarch.c: Re-generate.
* frame.h (FRAME_CHAIN_VALID): Delete definition.
Index: frame.h
===================================================================
RCS file: /cvs/src/src/gdb/frame.h,v
retrieving revision 1.8
diff -u -r1.8 frame.h
--- frame.h 2001/12/07 12:10:15 1.8
+++ frame.h 2002/02/17 17:17:04
@@ -152,9 +152,6 @@
targets. If FRAME_CHAIN_VALID returns zero it means that the given frame
is the outermost one and has no caller.
- If a particular target needs a different definition, then it can override
- the definition here by providing one in the tm file.
-
XXXX - both default and alternate frame_chain_valid functions are
deprecated. New code should use dummy frames and one of the
generic functions. */
@@ -165,17 +162,6 @@
extern int generic_file_frame_chain_valid (CORE_ADDR, struct frame_info *);
extern int generic_func_frame_chain_valid (CORE_ADDR, struct frame_info *);
extern void generic_save_dummy_frame_tos (CORE_ADDR sp);
-
-#if !defined (FRAME_CHAIN_VALID)
-#if !defined (FRAME_CHAIN_VALID_ALTERNATE)
-#define FRAME_CHAIN_VALID(chain, thisframe) file_frame_chain_valid (chain, thisframe)
-#else
-/* Use the alternate method of avoiding running up off the end of the frame
- chain or following frames back into the startup code. See the comments
- in objfiles.h. */
-#define FRAME_CHAIN_VALID(chain, thisframe) func_frame_chain_valid (chain,thisframe)
-#endif /* FRAME_CHAIN_VALID_ALTERNATE */
-#endif /* FRAME_CHAIN_VALID */
/* The stack frame that the user has specified for commands to act on.
Note that one cannot assume this is the address of valid data. */
Index: gdbarch.sh
===================================================================
RCS file: /cvs/src/src/gdb/gdbarch.sh,v
retrieving revision 1.116
diff -u -r1.116 gdbarch.sh
--- gdbarch.sh 2002/02/16 23:09:16 1.116
+++ gdbarch.sh 2002/02/17 17:17:05
@@ -545,8 +545,14 @@
v:2:FRAME_ARGS_SKIP:CORE_ADDR:frame_args_skip::::0:-1
f:2:FRAMELESS_FUNCTION_INVOCATION:int:frameless_function_invocation:struct frame_info *fi:fi:::generic_frameless_function_invocation_not::0
f:2:FRAME_CHAIN:CORE_ADDR:frame_chain:struct frame_info *frame:frame::0:0
-# See comments on DUMMY_FRAME for why this is required at level 1.
-f:1:FRAME_CHAIN_VALID:int:frame_chain_valid:CORE_ADDR chain, struct frame_info *thisframe:chain, thisframe::0:0
+# Define a default FRAME_CHAIN_VALID, in the form that is suitable for
+# most targets. If FRAME_CHAIN_VALID returns zero it means that the
+# given frame is the outermost one and has no caller.
+#
+# XXXX - both default and alternate frame_chain_valid functions are
+# deprecated. New code should use dummy frames and one of the generic
+# functions.
+f:2:FRAME_CHAIN_VALID:int:frame_chain_valid:CORE_ADDR chain, struct frame_info *thisframe:chain, thisframe:::func_frame_chain_valid::0
f:2:FRAME_SAVED_PC:CORE_ADDR:frame_saved_pc:struct frame_info *fi:fi::0:0
f:2:FRAME_ARGS_ADDRESS:CORE_ADDR:frame_args_address:struct frame_info *fi:fi::0:0
f:2:FRAME_LOCALS_ADDRESS:CORE_ADDR:frame_locals_address:struct frame_info *fi:fi::0:0