2004-02-08 Andrew Cagney <cagney@redhat.com>
authorAndrew Cagney <cagney@redhat.com>
Sun, 8 Feb 2004 18:53:15 +0000 (18:53 +0000)
committerAndrew Cagney <cagney@redhat.com>
Sun, 8 Feb 2004 18:53:15 +0000 (18:53 +0000)
* frame.c (legacy_frame_p): Check for DEPRECATED_TARGET_READ_FP_P
and DEPRECATED_FP_REGNUM.  Don't assume that the lack of
unwind_dummy_id indicates a legacy frame.

gdb/ChangeLog
gdb/frame.c

index f623e5cc031499f64cf390b1f40f525820f2ab51..c0c1f6aa47d4aba2362f228a3b7ace5d50d08fe0 100644 (file)
@@ -1,5 +1,9 @@
 2004-02-08  Andrew Cagney  <cagney@redhat.com>
 
+       * frame.c (legacy_frame_p): Check for DEPRECATED_TARGET_READ_FP_P
+       and DEPRECATED_FP_REGNUM.  Don't assume that the lack of
+       unwind_dummy_id indicates a legacy frame.
+
        * configure.in (CONFIG_LIB_OBS): Replace with CONFIG_OBS.
        * configure: Re-generate.
 
index 6c2a29f89d26b8bf9cfba9000078d75b20382e00..455d560a65b1842d3472b8d3172d335ef38be7a5 100644 (file)
@@ -2280,11 +2280,28 @@ frame_sp_unwind (struct frame_info *next_frame)
 int
 legacy_frame_p (struct gdbarch *current_gdbarch)
 {
-  return (DEPRECATED_INIT_FRAME_PC_P ()
-         || DEPRECATED_INIT_FRAME_PC_FIRST_P ()
-         || DEPRECATED_INIT_EXTRA_FRAME_INFO_P ()
-         || DEPRECATED_FRAME_CHAIN_P ()
-         || !gdbarch_unwind_dummy_id_p (current_gdbarch));
+  if (DEPRECATED_INIT_FRAME_PC_P ()
+      || DEPRECATED_INIT_FRAME_PC_FIRST_P ()
+      || DEPRECATED_INIT_EXTRA_FRAME_INFO_P ()
+      || DEPRECATED_FRAME_CHAIN_P ())
+    /* No question, it's a legacy frame.  */
+    return 1;
+  if (gdbarch_unwind_dummy_id_p (current_gdbarch))
+    /* No question, it's not a legacy frame (provided none of the
+       deprecated methods checked above are present that is).  */
+    return 0;
+  if (DEPRECATED_TARGET_READ_FP_P ()
+      || DEPRECATED_FP_REGNUM >= 0)
+    /* Assume it's legacy.  If you're trying to convert a legacy frame
+       target to the new mechanism, get rid of these.  legacy
+       get_prev_frame requires these when unwind_frame_id isn't
+       available.  */
+    return 1;
+  /* Default to assuming that it's brand new code, and hence not
+     legacy.  Force it down the non-legacy path so that the new code
+     uses the new frame mechanism from day one.  Dummy frame's won't
+     work very well but we can live with that.  */
+  return 0;
 }
 
 extern initialize_file_ftype _initialize_frame; /* -Wmissing-prototypes */
This page took 0.028477 seconds and 4 git commands to generate.