2003-04-28 Andrew Cagney <cagney@redhat.com>
[deliverable/binutils-gdb.git] / gdb / infcall.c
index 9d9cddda32006bdcf9fbf136b22692b8cf6695c4..f87d3ba3258dc2374f700ef5ebe9dd0a9b031d07 100644 (file)
@@ -737,9 +737,19 @@ You must use a pointer to function type variable. Command ignored.", arg_name);
     sal.section = find_pc_overlay (sal.pc);
     /* Set up a frame ID for the dummy frame so we can pass it to
        set_momentary_breakpoint.  We need to give the breakpoint a
-       frame ID so that the breakpoint code can correctly
-       re-identify the dummy breakpoint.  */
-    frame = frame_id_build (read_fp (), sal.pc);
+       frame ID so that the breakpoint code can correctly re-identify
+       the dummy breakpoint.  */
+    /* The assumption here is that push_dummy_call() returned the
+       stack part of the frame ID.  Unfortunatly, many older
+       architectures were, via a convoluted mess, relying on the
+       poorly defined and greatly overloaded DEPRECATED_TARGET_READ_FP
+       or DEPRECATED_FP_REGNUM to supply the value.  */
+    if (DEPRECATED_TARGET_READ_FP_P ())
+      frame = frame_id_build (DEPRECATED_TARGET_READ_FP (), sal.pc);
+    else if (DEPRECATED_FP_REGNUM >= 0)
+      frame = frame_id_build (read_register (DEPRECATED_FP_REGNUM), sal.pc);
+    else
+      frame = frame_id_build (sp, sal.pc);
     bpt = set_momentary_breakpoint (sal, frame, bp_call_dummy);
     bpt->disposition = disp_del;
   }
This page took 0.024165 seconds and 4 git commands to generate.