mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-20 18:08:24 +08:00
2010-06-08 Hui Zhu <teawater@gmail.com>
* record.c (record_wait): Move signal out of replay code.
This commit is contained in:
@ -1,3 +1,7 @@
|
|||||||
|
2010-06-08 Hui Zhu <teawater@gmail.com>
|
||||||
|
|
||||||
|
* record.c (record_wait): Move signal out of replay code.
|
||||||
|
|
||||||
2010-06-07 Jan Kratochvil <jan.kratochvil@redhat.com>
|
2010-06-07 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||||
|
|
||||||
Fix PR 10640.
|
Fix PR 10640.
|
||||||
|
12
gdb/record.c
12
gdb/record.c
@ -1069,6 +1069,9 @@ record_wait (struct target_ops *ops,
|
|||||||
"record_resume_step = %d\n",
|
"record_resume_step = %d\n",
|
||||||
record_resume_step);
|
record_resume_step);
|
||||||
|
|
||||||
|
record_get_sig = 0;
|
||||||
|
signal (SIGINT, record_sig_handler);
|
||||||
|
|
||||||
if (!RECORD_IS_REPLAY && ops != &record_core_ops)
|
if (!RECORD_IS_REPLAY && ops != &record_core_ops)
|
||||||
{
|
{
|
||||||
if (record_resume_step)
|
if (record_resume_step)
|
||||||
@ -1088,6 +1091,9 @@ record_wait (struct target_ops *ops,
|
|||||||
ret = record_beneath_to_wait (record_beneath_to_wait_ops,
|
ret = record_beneath_to_wait (record_beneath_to_wait_ops,
|
||||||
ptid, status, options);
|
ptid, status, options);
|
||||||
|
|
||||||
|
if (record_resume_step)
|
||||||
|
return ret;
|
||||||
|
|
||||||
/* Is this a SIGTRAP? */
|
/* Is this a SIGTRAP? */
|
||||||
if (status->kind == TARGET_WAITKIND_STOPPED
|
if (status->kind == TARGET_WAITKIND_STOPPED
|
||||||
&& status->value.sig == TARGET_SIGNAL_TRAP)
|
&& status->value.sig == TARGET_SIGNAL_TRAP)
|
||||||
@ -1183,8 +1189,6 @@ record_wait (struct target_ops *ops,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
record_get_sig = 0;
|
|
||||||
signal (SIGINT, record_sig_handler);
|
|
||||||
/* If GDB is in terminal_inferior mode, it will not get the signal.
|
/* If GDB is in terminal_inferior mode, it will not get the signal.
|
||||||
And in GDB replay mode, GDB doesn't need to be in terminal_inferior
|
And in GDB replay mode, GDB doesn't need to be in terminal_inferior
|
||||||
mode, because inferior will not executed.
|
mode, because inferior will not executed.
|
||||||
@ -1298,8 +1302,6 @@ Process record: hit hw watchpoint.\n");
|
|||||||
}
|
}
|
||||||
while (continue_flag);
|
while (continue_flag);
|
||||||
|
|
||||||
signal (SIGINT, handle_sigint);
|
|
||||||
|
|
||||||
replay_out:
|
replay_out:
|
||||||
if (record_get_sig)
|
if (record_get_sig)
|
||||||
status->value.sig = TARGET_SIGNAL_INT;
|
status->value.sig = TARGET_SIGNAL_INT;
|
||||||
@ -1312,6 +1314,8 @@ replay_out:
|
|||||||
discard_cleanups (old_cleanups);
|
discard_cleanups (old_cleanups);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
signal (SIGINT, handle_sigint);
|
||||||
|
|
||||||
do_cleanups (set_cleanups);
|
do_cleanups (set_cleanups);
|
||||||
return inferior_ptid;
|
return inferior_ptid;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user