* gdbarch.sh (FRAME_CHAIN_VALID): Only require at level 2.
authorAndrew Cagney <cagney@redhat.com>
Mon, 18 Feb 2002 15:59:14 +0000 (15:59 +0000)
committerAndrew Cagney <cagney@redhat.com>
Mon, 18 Feb 2002 15:59:14 +0000 (15:59 +0000)
Default to func_frame_chain_valid.
* gdbarch.h, gdbarch.c: Re-generate.
* frame.h (FRAME_CHAIN_VALID): Delete definition.

gdb/ChangeLog
gdb/frame.h
gdb/gdbarch.c
gdb/gdbarch.h
gdb/gdbarch.sh

index 5bbf94c1203b5859a5f1112cdd84948308b3383d..ab9e7a349ae27ffc4ae5997cb177a83f285388d6 100644 (file)
@@ -1,3 +1,10 @@
+2002-02-18  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.
+
 2002-02-18  Elena Zannoni  <ezannoni@redhat.com>
 
        * ppc-linux-nat.c: Update copyright.
index f4c51e07b42ed4ed84880cd7c9e1c2aa6fb1cde2..b5f535a26d045b5257c1c4a03e377bc517007c44 100644 (file)
@@ -152,9 +152,6 @@ extern void frame_saved_regs_zalloc (struct frame_info *);
    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. */
@@ -166,17 +163,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 8467d414237e96c42e55dd9a94211f54b7efc414..5aad461ed481fd3184be517c6483b9d026e2e6f2 100644 (file)
@@ -514,6 +514,7 @@ gdbarch_alloc (const struct gdbarch_info *info,
   current_gdbarch->remote_translate_xfer_address = generic_remote_translate_xfer_address;
   current_gdbarch->frame_args_skip = -1;
   current_gdbarch->frameless_function_invocation = generic_frameless_function_invocation_not;
+  current_gdbarch->frame_chain_valid = func_frame_chain_valid;
   current_gdbarch->extra_stack_alignment_needed = 1;
   current_gdbarch->convert_from_func_ptr_addr = core_addr_identity;
   current_gdbarch->addr_bits_remove = core_addr_identity;
@@ -742,9 +743,7 @@ verify_gdbarch (struct gdbarch *gdbarch)
   if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
       && (gdbarch->frame_chain == 0))
     fprintf_unfiltered (log, "\n\tframe_chain");
-  if ((GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL)
-      && (gdbarch->frame_chain_valid == 0))
-    fprintf_unfiltered (log, "\n\tframe_chain_valid");
+  /* Skip verify of frame_chain_valid, invalid_p == 0 */
   if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
       && (gdbarch->frame_saved_pc == 0))
     fprintf_unfiltered (log, "\n\tframe_saved_pc");
index 2dba00f3ee1e1f24cc5768b5e4a8cadebbff27f6..81f5174aa8bccd6bcd6ccd3419f108f2fcab689e 100644 (file)
@@ -1812,16 +1812,27 @@ extern void set_gdbarch_frame_chain (struct gdbarch *gdbarch, gdbarch_frame_chai
 #endif
 #endif
 
-/* See comments on DUMMY_FRAME for why this is required at level 1. */
+/* 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. */
+
+/* Default (function) for non- multi-arch platforms. */
+#if (!GDB_MULTI_ARCH) && !defined (FRAME_CHAIN_VALID)
+#define FRAME_CHAIN_VALID(chain, thisframe) (func_frame_chain_valid (chain, thisframe))
+#endif
 
 typedef int (gdbarch_frame_chain_valid_ftype) (CORE_ADDR chain, struct frame_info *thisframe);
 extern int gdbarch_frame_chain_valid (struct gdbarch *gdbarch, CORE_ADDR chain, struct frame_info *thisframe);
 extern void set_gdbarch_frame_chain_valid (struct gdbarch *gdbarch, gdbarch_frame_chain_valid_ftype *frame_chain_valid);
-#if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) && defined (FRAME_CHAIN_VALID)
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FRAME_CHAIN_VALID)
 #error "Non multi-arch definition of FRAME_CHAIN_VALID"
 #endif
 #if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) || !defined (FRAME_CHAIN_VALID)
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FRAME_CHAIN_VALID)
 #define FRAME_CHAIN_VALID(chain, thisframe) (gdbarch_frame_chain_valid (current_gdbarch, chain, thisframe))
 #endif
 #endif
index 996b87668d367f6fb5e91102554a3a7a68c9197b..310d3c4cd7c90a3bcffe91aa1bb9716396cb8165 100755 (executable)
@@ -547,8 +547,14 @@ f:2:REMOTE_TRANSLATE_XFER_ADDRESS:void:remote_translate_xfer_address:CORE_ADDR g
 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
This page took 0.03228 seconds and 4 git commands to generate.