|
@@ -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. */
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|