diff options
Diffstat (limited to 'gdb/infrun.c')
-rw-r--r-- | gdb/infrun.c | 33 |
1 files changed, 15 insertions, 18 deletions
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). |