Permalink
Browse files

Add missing file

  • Loading branch information...
1 parent 5ef8777 commit 1e6b5bf8d64fa1c62fb37d6b6da4d359b8c08cea @peterix peterix committed Apr 11, 2010
Showing with 41 additions and 0 deletions.
  1. +41 −0 tools/unstuck.cpp
View
@@ -0,0 +1,41 @@
+// Make stuck DF run again.
+
+#include <iostream>
+#include <climits>
+#include <integers.h>
+#include <vector>
+#include <ctime>
+#include <string>
+using namespace std;
+
+#include <DFTypes.h>
+#include <DFHackAPI.h>
+
+int main (void)
+{
+ string blah;
+ DFHack::API DF("Memory.xml");
+ try
+ {
+ DF.Attach();
+ }
+ catch (exception& e)
+ {
+ cerr << e.what() << endl;
+ #ifndef LINUX_BUILD
+ cin.ignore();
+ #endif
+ return 1;
+ }
+
+ DF.ForceResume();
+ cout << "DF should be running again :)" << endl;
+ getline(cin, blah);
+
+ if(!DF.Detach())
+ {
+ cerr << "Can't detach from DF" << endl;
+ return 1;
+ }
+ return 0;
+}

0 comments on commit 1e6b5bf

Please sign in to comment.