Don't rely on ecs->wait_for_more.
* infrun.c (proceed): Clear the stepping state, set previous_inferior_ptid and clear infwait state. (wait_for_inferior): Don't clear the stepping state, set previous_inferior_ptid, or clear the infwait state here. (fetch_inferior_event): Don't clear the stepping state, set previous_inferior_ptid, or clear the infwait state here. Don't condition on wait_for_more.
This commit is contained in:
parent
0d1e5fa71a
commit
59f0d5d953
@ -1,3 +1,15 @@
|
|||||||
|
2008-07-09 Pedro Alves <pedro@codesourcery.com>
|
||||||
|
|
||||||
|
Don't rely on ecs->wait_for_more.
|
||||||
|
|
||||||
|
* infrun.c (proceed): Clear the stepping state, set
|
||||||
|
previous_inferior_ptid and clear infwait state.
|
||||||
|
(wait_for_inferior): Don't clear the stepping state, set
|
||||||
|
previous_inferior_ptid, or clear the infwait state here.
|
||||||
|
(fetch_inferior_event): Don't clear the stepping state, set
|
||||||
|
previous_inferior_ptid, or clear the infwait state here. Don't
|
||||||
|
condition on wait_for_more.
|
||||||
|
|
||||||
2008-07-09 Pedro Alves <pedro@codesourcery.com>
|
2008-07-09 Pedro Alves <pedro@codesourcery.com>
|
||||||
|
|
||||||
Refactor infrun a bit.
|
Refactor infrun a bit.
|
||||||
|
29
gdb/infrun.c
29
gdb/infrun.c
@ -1288,6 +1288,15 @@ proceed (CORE_ADDR addr, enum target_signal siggnal, int step)
|
|||||||
updated correctly when the inferior is stopped. */
|
updated correctly when the inferior is stopped. */
|
||||||
prev_pc = regcache_read_pc (get_current_regcache ());
|
prev_pc = regcache_read_pc (get_current_regcache ());
|
||||||
|
|
||||||
|
/* Fill in with reasonable starting values. */
|
||||||
|
init_thread_stepping_state (tss);
|
||||||
|
|
||||||
|
/* We'll update this if & when we switch to a new thread. */
|
||||||
|
previous_inferior_ptid = inferior_ptid;
|
||||||
|
|
||||||
|
/* Reset to normal state. */
|
||||||
|
init_infwait_state ();
|
||||||
|
|
||||||
/* Resume inferior. */
|
/* Resume inferior. */
|
||||||
resume (oneproc || step || bpstat_should_step (), stop_signal);
|
resume (oneproc || step || bpstat_should_step (), stop_signal);
|
||||||
|
|
||||||
@ -1460,15 +1469,6 @@ wait_for_inferior (int treat_exec_as_sigtrap)
|
|||||||
ecs = &ecss;
|
ecs = &ecss;
|
||||||
memset (ecs, 0, sizeof (*ecs));
|
memset (ecs, 0, sizeof (*ecs));
|
||||||
|
|
||||||
/* Fill in with reasonable starting values. */
|
|
||||||
init_thread_stepping_state (tss);
|
|
||||||
|
|
||||||
/* Reset to normal state. */
|
|
||||||
init_infwait_state ();
|
|
||||||
|
|
||||||
/* We'll update this if & when we switch to a new thread. */
|
|
||||||
previous_inferior_ptid = inferior_ptid;
|
|
||||||
|
|
||||||
overlay_cache_invalid = 1;
|
overlay_cache_invalid = 1;
|
||||||
|
|
||||||
/* We have to invalidate the registers BEFORE calling target_wait
|
/* We have to invalidate the registers BEFORE calling target_wait
|
||||||
@ -1519,16 +1519,6 @@ fetch_inferior_event (void *client_data)
|
|||||||
|
|
||||||
memset (ecs, 0, sizeof (*ecs));
|
memset (ecs, 0, sizeof (*ecs));
|
||||||
|
|
||||||
if (!ecs->wait_some_more)
|
|
||||||
{
|
|
||||||
/* Fill in with reasonable starting values. */
|
|
||||||
init_thread_stepping_state (tcs);
|
|
||||||
|
|
||||||
init_infwait_state ();
|
|
||||||
|
|
||||||
/* We'll update this if & when we switch to a new thread. */
|
|
||||||
previous_inferior_ptid = inferior_ptid;
|
|
||||||
|
|
||||||
overlay_cache_invalid = 1;
|
overlay_cache_invalid = 1;
|
||||||
|
|
||||||
/* We have to invalidate the registers BEFORE calling target_wait
|
/* We have to invalidate the registers BEFORE calling target_wait
|
||||||
@ -1538,7 +1528,6 @@ fetch_inferior_event (void *client_data)
|
|||||||
status mechanism. */
|
status mechanism. */
|
||||||
|
|
||||||
registers_changed ();
|
registers_changed ();
|
||||||
}
|
|
||||||
|
|
||||||
if (deprecated_target_wait_hook)
|
if (deprecated_target_wait_hook)
|
||||||
ecs->ptid =
|
ecs->ptid =
|
||||||
|
Loading…
Reference in New Issue
Block a user