]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
2006-03-31 Michael Snyder <msnyder@redhat.com>
authorMichael Snyder <msnyder@vmware.com>
Fri, 31 Mar 2006 21:05:37 +0000 (21:05 +0000)
committerMichael Snyder <msnyder@vmware.com>
Fri, 31 Mar 2006 21:05:37 +0000 (21:05 +0000)
* infrun.c: Make sure to check for EXEC_REVERSE not EXEC_FORWARD,
since targets that don't implement execdir will return EXEC_ERROR.

gdb/ChangeLog
gdb/infrun.c

index c32fca3b730d3d303c97d403fed1d4b2f8bbcf09..cb7b6362aaa164d5e4438aac89f99d3f4e790c3c 100644 (file)
        Handle stepping into a function in reverse.
        Handle stepping between line ranges in reverse.
        (print_stop_reason): Print reason for NO_HISTORY.
-       
+
+2006-03-31  Michael Snyder  <msnyder@redhat.com>
+
+       * infrun.c: Make sure to check for EXEC_REVERSE not EXEC_FORWARD,
+       since targets that don't implement execdir will return EXEC_ERROR.
+
 2006-03-31  Andrew Stubbs  <andrew.stubbs@st.com>
 
        * value.h (struct internalvar): Add field 'endian'.
index bf30b3d087e6e441bf016e537aad4e1bc9ab1e7b..e29f794b9297384bfa7738435b2ba45467150e95 100644 (file)
@@ -2439,13 +2439,7 @@ process_event_stop_test:
             get there, we'll need to single-step back to the
             caller.  */
 
-         /* FIXME EXEC_ERROR */
-         if (target_get_execution_direction () == EXEC_FORWARD)
-           {
-             insert_step_resume_breakpoint_at_frame
-               (get_prev_frame (get_current_frame ()));
-           }
-         else
+         if (target_get_execution_direction () == EXEC_REVERSE)
            {
              /* FIXME: I'm not sure if we've handled the frame for
                 recursion.  */
@@ -2455,6 +2449,11 @@ process_event_stop_test:
              sr_sal.pc = ecs->stop_func_start;
              insert_step_resume_breakpoint_at_sal (sr_sal, null_frame_id);
            }
+         else
+           {
+             insert_step_resume_breakpoint_at_frame
+               (get_prev_frame (get_current_frame ()));
+           }
          keep_going (ecs);
          return;
        }
@@ -2515,15 +2514,7 @@ process_event_stop_test:
          return;
        }
 
-      /* FIXME EXEC_ERROR */
-      if (target_get_execution_direction () == EXEC_FORWARD)
-       {
-         /* Set a breakpoint at callee's return address (the address
-            at which the caller will resume).  */
-         insert_step_resume_breakpoint_at_frame
-           (get_prev_frame (get_current_frame ()));
-       }
-      else
+      if (target_get_execution_direction () == EXEC_REVERSE)
        {
          /* Set a breakpoint at callee's start address.
             From there we can step once and be back in the caller.  */
@@ -2533,6 +2524,13 @@ process_event_stop_test:
          sr_sal.pc = ecs->stop_func_start;
          insert_step_resume_breakpoint_at_sal (sr_sal, null_frame_id);
        }
+      else
+       {
+         /* Set a breakpoint at callee's return address (the address
+            at which the caller will resume).  */
+         insert_step_resume_breakpoint_at_frame
+           (get_prev_frame (get_current_frame ()));
+       }
       keep_going (ecs);
       return;
     }
@@ -2658,8 +2656,7 @@ process_event_stop_test:
 
   if (ecs->stop_func_end && ecs->sal.end >= ecs->stop_func_end)
     {
-      /* FIXME EXEC_ERROR */
-      if (target_get_execution_direction () == EXEC_FORWARD)
+      if (target_get_execution_direction () != EXEC_REVERSE)
        {
          /* If this is the last line of the function, don't keep
             stepping (it would probably step us out of the function).