From: Michael Snyder Date: Fri, 31 Mar 2006 21:05:37 +0000 (+0000) Subject: 2006-03-31 Michael Snyder X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=42b5a1cfa1496f1706ac1a3e6ae7429f658050ad;p=thirdparty%2Fbinutils-gdb.git 2006-03-31 Michael Snyder * infrun.c: Make sure to check for EXEC_REVERSE not EXEC_FORWARD, since targets that don't implement execdir will return EXEC_ERROR. --- 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 + + * 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 * 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).