summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Snyder <msnyder@specifix.com>2006-03-31 21:05:37 +0000
committerMichael Snyder <msnyder@specifix.com>2006-03-31 21:05:37 +0000
commit2f40306e4b652cda546c02ab0a1aedf91fa21f84 (patch)
tree8a06881d8eef8da6388640edc1b84df4f7f56684
parent0dcf8511415d7459ee604057fbdf285c7858c586 (diff)
downloadgdb-2f40306e4b652cda546c02ab0a1aedf91fa21f84.tar.gz
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.
-rw-r--r--gdb/ChangeLog7
-rw-r--r--gdb/infrun.c33
2 files changed, 21 insertions, 19 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index c32fca3b730..cb7b6362aaa 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -28,7 +28,12 @@
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'.
diff --git a/gdb/infrun.c b/gdb/infrun.c
index bf30b3d087e..e29f794b929 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -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).