Implement support for restarting teams.
- TeamDebugger's listener interface now exports a TeamDebuggerRestartRequested hook. The latter is used to request starting a new debugger instance with the same arguments/settings as the team it represented. Implemented for the graphical debugger. - When a team terminates, the resulting dialog now allows the user to choose to quit, restart, or simply do nothing. The latter option still needs some work though, as e.g. setting additional breakpoints currently fails since the corresponding debugger interface is no longer around. Implements the main part of #9774.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright 2009, Ingo Weinhold, [email protected].
|
||||
* Copyright 2013, Rene Gollent, [email protected].
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
#ifndef TEAM_DEBUGGER_H
|
||||
@@ -40,12 +41,19 @@ public:
|
||||
~TeamDebugger();
|
||||
|
||||
status_t Init(team_id teamID, thread_id threadID,
|
||||
int argc,
|
||||
const char* const* argv,
|
||||
bool stopInMain);
|
||||
|
||||
void Activate();
|
||||
|
||||
team_id TeamID() const { return fTeamID; }
|
||||
|
||||
int ArgumentCount() const
|
||||
{ return fCommandLineArgc; }
|
||||
const char** Arguments() const
|
||||
{ return fCommandLineArgv; }
|
||||
|
||||
virtual void MessageReceived(BMessage* message);
|
||||
|
||||
private:
|
||||
@@ -153,6 +161,8 @@ private:
|
||||
void _HandleInspectAddress(
|
||||
target_addr_t address,
|
||||
TeamMemoryBlock::Listener* listener);
|
||||
status_t _HandleSetArguments(int argc,
|
||||
const char* const* argv);
|
||||
|
||||
ThreadHandler* _GetThreadHandler(thread_id threadID);
|
||||
|
||||
@@ -189,6 +199,8 @@ private:
|
||||
volatile bool fTerminating;
|
||||
bool fKillTeamOnQuit;
|
||||
TeamSettings fTeamSettings;
|
||||
int fCommandLineArgc;
|
||||
const char** fCommandLineArgv;
|
||||
};
|
||||
|
||||
|
||||
@@ -197,6 +209,8 @@ public:
|
||||
virtual ~Listener();
|
||||
|
||||
virtual void TeamDebuggerStarted(TeamDebugger* debugger) = 0;
|
||||
virtual void TeamDebuggerRestartRequested(
|
||||
TeamDebugger* debugger) = 0;
|
||||
virtual void TeamDebuggerQuit(TeamDebugger* debugger) = 0;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user