Debugger CLI: Wait for TeamDebugger thread to die before exit()
This commit is contained in:
@@ -594,14 +594,20 @@ CliDebugger::Run(const Options& options)
|
|||||||
if (!get_debugged_program(options, programInfo))
|
if (!get_debugged_program(options, programInfo))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (start_team_debugger(programInfo.team, &settingsManager, this,
|
TeamDebugger* teamDebugger = start_team_debugger(programInfo.team,
|
||||||
programInfo.thread, programInfo.stopInMain, userInterface)
|
&settingsManager, this, programInfo.thread, programInfo.stopInMain,
|
||||||
== NULL) {
|
userInterface);
|
||||||
|
if (teamDebugger == NULL)
|
||||||
return false;
|
return false;
|
||||||
}
|
|
||||||
|
|
||||||
|
thread_id teamDebuggerThread = teamDebugger->Thread();
|
||||||
|
|
||||||
|
// run the input loop
|
||||||
userInterface->Run();
|
userInterface->Run();
|
||||||
|
|
||||||
|
// wait for the team debugger thread to terminate
|
||||||
|
wait_for_thread(teamDebuggerThread, NULL);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user