btrfs: [] on the end of a struct field is a variable length array.
[haiku.git] / headers / private / debug / DebugContext.h
bloba54aa78d0b3761424094b2db3d4bb53309e4682b
1 /*
2 * Copyright 2010, Ingo Weinhold, ingo_weinhold@gmx.de.
3 * Distributed under the terms of the MIT License.
4 */
5 #ifndef _DEBUG_CONTEXT_H
6 #define _DEBUG_CONTEXT_H
9 #include <debug_support.h>
12 class BDebugContext {
13 public:
14 BDebugContext();
15 ~BDebugContext();
17 status_t Init(team_id team, port_id nubPort);
18 void Uninit();
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,
42 int32 length);
43 status_t ClearWatchpoint(void* address);
45 status_t ContinueThread(thread_id thread,
46 bool singleStep = false);
47 status_t SetThreadDebuggingFlags(thread_id thread,
48 int32 flags);
49 status_t GetThreadCpuState(thread_id thread,
50 debug_debugger_message* _messageCode,
51 debug_cpu_state* cpuState);
53 protected:
54 debug_context fContext;
58 #endif // _DEBUG_CONTEXT_H