2 * Copyright 2010, Ingo Weinhold, ingo_weinhold@gmx.de.
3 * Distributed under the terms of the MIT License.
5 #ifndef _DEBUG_CONTEXT_H
6 #define _DEBUG_CONTEXT_H
9 #include <debug_support.h>
17 status_t
Init(team_id team
, port_id nubPort
);
20 team_id
Team() const { return fContext
.team
; }
21 port_id
NubPort() const { return fContext
.nub_port
; }
22 port_id
ReplyPort() const
23 { return fContext
.reply_port
; }
25 status_t
SendDebugMessage(int32 messageCode
,
26 const void *message
, size_t messageSize
,
27 void* reply
, size_t replySize
);
29 status_t
SetTeamDebuggingFlags(int32 flags
);
31 ssize_t
ReadMemoryPartial(const void* address
,
32 void* buffer
, size_t size
);
33 ssize_t
ReadMemory(const void* address
,
34 void* buffer
, size_t size
);
35 ssize_t
ReadString(const void* address
,
36 char* buffer
, size_t size
);
38 status_t
SetBreakpoint(void* address
);
39 status_t
ClearBreakpoint(void* address
);
41 status_t
SetWatchpoint(void* address
, uint32 type
,
43 status_t
ClearWatchpoint(void* address
);
45 status_t
ContinueThread(thread_id thread
,
46 bool singleStep
= false);
47 status_t
SetThreadDebuggingFlags(thread_id thread
,
49 status_t
GetThreadCpuState(thread_id thread
,
50 debug_debugger_message
* _messageCode
,
51 debug_cpu_state
* cpuState
);
54 debug_context fContext
;
58 #endif // _DEBUG_CONTEXT_H