Statetrace: Make sure the current state is loaded to print the initial stack frame.
[gem5.git] / util / statetrace / statetrace.cc
index 2861bb29ceb0b490783a3e7bc662eae454036a5c..e2762ac2c7a9e5920327c404bd644d5ca027ac7c 100644 (file)
@@ -123,6 +123,7 @@ int main(int argc, char * argv[], char * envp[])
         cerr << "Couldn't start target program" << endl;
         return 1;
     }
+    child->step();
     if(printInitial)
     {
         child->outputStartState(cout);
@@ -157,7 +158,6 @@ int main(int argc, char * argv[], char * envp[])
             cerr << "Couldn't connect to server! " << strerror(errno) << endl;
             return 1;
         }
-        child->step();
         while(child->isTracing())
         {
                 if(!child->sendState(sock))