53446ebf80
* BDebugMessageHandler: Interface with hooks for handling of debug messages. * BDebugContext: Essentially a C++ wrapper for struct debug_context, with handy methods for controlling a debugged team. * BTeamDebugger: Proxy for a debugged team. Derived from BDebugContext. * BDebugLooper: Wraps a main debug message loop. Any number of BTeamDebuggers can be added and associated with BDebugMessageHandlers. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35953 a95241bf-73f2-0310-859d-f6bbb57e9c96
45 lines
939 B
C++
45 lines
939 B
C++
/*
|
|
* Copyright 2010, Ingo Weinhold, ingo_weinhold@gmx.de.
|
|
* Distributed under the terms of the MIT License.
|
|
*/
|
|
#ifndef _TEAM_DEBUGGER_H
|
|
#define _TEAM_DEBUGGER_H
|
|
|
|
|
|
#include <debugger.h>
|
|
|
|
#include <DebugContext.h>
|
|
|
|
|
|
class BPath;
|
|
|
|
|
|
class BTeamDebugger : public BDebugContext {
|
|
public:
|
|
BTeamDebugger();
|
|
~BTeamDebugger();
|
|
|
|
status_t Install(team_id team);
|
|
status_t Uninstall();
|
|
|
|
status_t LoadProgram(const char* const* args,
|
|
int32 argCount, bool traceLoading);
|
|
|
|
status_t ReadDebugMessage(int32& _messageCode,
|
|
debug_debugger_message_data& messageBuffer);
|
|
|
|
port_id DebuggerPort() const { return fDebuggerPort; }
|
|
|
|
private:
|
|
static thread_id _LoadProgram(const char* const* args,
|
|
int32 argCount, bool traceLoading);
|
|
static status_t _FindProgram(const char* programName,
|
|
BPath& resolvedPath);
|
|
|
|
private:
|
|
port_id fDebuggerPort;
|
|
};
|
|
|
|
|
|
#endif // _TEAM_DEBUGGER_H
|