all repos — mgba @ 0a898f66b4c3cf63e32bc90d73dae33fee41a29a

mGBA Game Boy Advance Emulator

include/mgba/internal/lr35902/debugger/debugger.h (view raw)

 1/* Copyright (c) 2013-2016 Jeffrey Pfau
 2 *
 3 * This Source Code Form is subject to the terms of the Mozilla Public
 4 * License, v. 2.0. If a copy of the MPL was not distributed with this
 5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 6#ifndef LR35902_DEBUGGER_H
 7#define LR35902_DEBUGGER_H
 8
 9#include <mgba-util/common.h>
10
11CXX_GUARD_START
12
13#include <mgba/internal/debugger/debugger.h>
14
15#include <mgba/internal/lr35902/lr35902.h>
16
17
18struct LR35902DebugBreakpoint {
19	uint16_t address;
20	int segment;
21};
22
23struct LR35902DebugWatchpoint {
24	uint16_t address;
25	int segment;
26	enum mWatchpointType type;
27};
28
29struct LR35902Segment {
30	uint16_t start;
31	uint16_t end;
32	const char* name;
33};
34
35DECLARE_VECTOR(LR35902DebugBreakpointList, struct LR35902DebugBreakpoint);
36DECLARE_VECTOR(LR35902DebugWatchpointList, struct LR35902DebugWatchpoint);
37
38struct LR35902Debugger {
39	struct mDebuggerPlatform d;
40	struct LR35902Core* cpu;
41
42	struct LR35902DebugBreakpointList breakpoints;
43	struct LR35902DebugWatchpointList watchpoints;
44	struct LR35902Memory originalMemory;
45
46	const struct LR35902Segment* segments;
47};
48
49struct mDebuggerPlatform* LR35902DebuggerPlatformCreate(void);
50
51CXX_GUARD_END
52
53#endif