mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-27 20:33:54 -06:00
replay: create temporary snapshot at debugger connection
When record/replay does not uses overlays for storing the snapshots, user is not capable of issuing reverse debugging commands. This patch adds creation of the VM snapshot on the temporary overlay image, when the debugger connects to QEMU. Therefore the execution can be rewind to the moment of the debugger connection while debugging the virtual machine. Signed-off-by: Pavel Dovgalyuk <Pavel.Dovgalyuk@ispras.ru> -- v6: - dropped unused error processing (suggested by Philippe Mathieu-Daudé) Message-Id: <160174524096.12451.11651270339216758643.stgit@pasha-ThinkPad-X280> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
9a608af3c0
commit
56357d80fc
3 changed files with 17 additions and 0 deletions
|
@ -318,3 +318,17 @@ void replay_breakpoint(void)
|
|||
assert(replay_mode == REPLAY_MODE_PLAY);
|
||||
replay_last_breakpoint = replay_get_current_icount();
|
||||
}
|
||||
|
||||
void replay_gdb_attached(void)
|
||||
{
|
||||
/*
|
||||
* Create VM snapshot on temporary overlay to allow reverse
|
||||
* debugging even if snapshots were not enabled.
|
||||
*/
|
||||
if (replay_mode == REPLAY_MODE_PLAY
|
||||
&& !replay_snapshot) {
|
||||
if (save_snapshot("start_debugging", NULL) != 0) {
|
||||
/* Can't create the snapshot. Continue conventional debugging. */
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue