Added Architecture and DebuggerInterface to the TeamDebugModel.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31117 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
495676cab6
commit
6383ae9c30
@ -13,9 +13,12 @@
|
|||||||
// #pragma mark - TeamDebugModel
|
// #pragma mark - TeamDebugModel
|
||||||
|
|
||||||
|
|
||||||
TeamDebugModel::TeamDebugModel(Team* team)
|
TeamDebugModel::TeamDebugModel(Team* team, DebuggerInterface* debuggerInterface,
|
||||||
|
Architecture* architecture)
|
||||||
:
|
:
|
||||||
fTeam(team)
|
fTeam(team),
|
||||||
|
fDebuggerInterface(debuggerInterface),
|
||||||
|
fArchitecture(architecture)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -14,13 +14,19 @@
|
|||||||
//};
|
//};
|
||||||
|
|
||||||
|
|
||||||
|
class Architecture;
|
||||||
|
class DebuggerInterface;
|
||||||
|
|
||||||
|
|
||||||
class TeamDebugModel {
|
class TeamDebugModel {
|
||||||
public:
|
public:
|
||||||
class Event;
|
class Event;
|
||||||
class Listener;
|
class Listener;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
TeamDebugModel(Team* team);
|
TeamDebugModel(Team* team,
|
||||||
|
DebuggerInterface* debuggerInterface,
|
||||||
|
Architecture* architecture);
|
||||||
~TeamDebugModel();
|
~TeamDebugModel();
|
||||||
|
|
||||||
status_t Init();
|
status_t Init();
|
||||||
@ -29,6 +35,10 @@ public:
|
|||||||
void Unlock() { fTeam->Unlock(); }
|
void Unlock() { fTeam->Unlock(); }
|
||||||
|
|
||||||
Team* GetTeam() const { return fTeam; }
|
Team* GetTeam() const { return fTeam; }
|
||||||
|
DebuggerInterface* GetDebuggerInterface() const
|
||||||
|
{ return fDebuggerInterface; }
|
||||||
|
Architecture* GetArchitecture() const
|
||||||
|
{ return fArchitecture; }
|
||||||
|
|
||||||
void AddListener(Listener* listener);
|
void AddListener(Listener* listener);
|
||||||
void RemoveListener(Listener* listener);
|
void RemoveListener(Listener* listener);
|
||||||
@ -38,6 +48,8 @@ private:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
Team* fTeam;
|
Team* fTeam;
|
||||||
|
DebuggerInterface* fDebuggerInterface;
|
||||||
|
Architecture* fArchitecture;
|
||||||
ListenerList fListeners;
|
ListenerList fListeners;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -81,15 +81,6 @@ TeamDebugger::Init(team_id teamID, thread_id threadID, bool stopInMain)
|
|||||||
fTeam->SetName(teamInfo.args);
|
fTeam->SetName(teamInfo.args);
|
||||||
// TODO: Set a better name!
|
// TODO: Set a better name!
|
||||||
|
|
||||||
// create the team debug model
|
|
||||||
fDebugModel = new(std::nothrow) TeamDebugModel(fTeam);
|
|
||||||
if (fDebugModel == NULL)
|
|
||||||
return B_NO_MEMORY;
|
|
||||||
|
|
||||||
error = fDebugModel->Init();
|
|
||||||
if (error != B_OK)
|
|
||||||
return error;
|
|
||||||
|
|
||||||
// create our worker
|
// create our worker
|
||||||
fWorker = new(std::nothrow) Worker;
|
fWorker = new(std::nothrow) Worker;
|
||||||
if (fWorker == NULL)
|
if (fWorker == NULL)
|
||||||
@ -108,6 +99,16 @@ TeamDebugger::Init(team_id teamID, thread_id threadID, bool stopInMain)
|
|||||||
if (error != B_OK)
|
if (error != B_OK)
|
||||||
return error;
|
return error;
|
||||||
|
|
||||||
|
// create the team debug model
|
||||||
|
fDebugModel = new(std::nothrow) TeamDebugModel(fTeam, fDebuggerInterface,
|
||||||
|
fDebuggerInterface->GetArchitecture());
|
||||||
|
if (fDebugModel == NULL)
|
||||||
|
return B_NO_MEMORY;
|
||||||
|
|
||||||
|
error = fDebugModel->Init();
|
||||||
|
if (error != B_OK)
|
||||||
|
return error;
|
||||||
|
|
||||||
// set team debugging flags
|
// set team debugging flags
|
||||||
fDebuggerInterface->SetTeamDebuggingFlags(
|
fDebuggerInterface->SetTeamDebuggingFlags(
|
||||||
B_TEAM_DEBUG_THREADS | B_TEAM_DEBUG_IMAGES);
|
B_TEAM_DEBUG_THREADS | B_TEAM_DEBUG_IMAGES);
|
||||||
|
Loading…
Reference in New Issue
Block a user