all repos — mgba @ a8731d280f1cb73d462e9c278cbf2bddc480ef58

mGBA Game Boy Advance Emulator

src/platform/commandline.h (view raw)

 1#ifndef COMMAND_LINE_H
 2#define COMMAND_LINE_H
 3
 4#include "util/common.h"
 5
 6#include "gba-config.h"
 7
 8enum DebuggerType {
 9	DEBUGGER_NONE = 0,
10#ifdef USE_CLI_DEBUGGER
11	DEBUGGER_CLI,
12#endif
13#ifdef USE_GDB_STUB
14	DEBUGGER_GDB,
15#endif
16	DEBUGGER_MAX
17};
18
19struct GBAArguments {
20	char* fname;
21	char* patch;
22	bool dirmode;
23
24	enum DebuggerType debuggerType;
25	bool debugAtStart;
26};
27
28struct SubParser {
29	const char* usage;
30	bool (*parse)(struct SubParser* parser, struct GBAConfig* config, int option, const char* arg);
31	const char* extraOptions;
32	void* opts;
33};
34
35struct GraphicsOpts {
36	int multiplier;
37};
38
39struct GBAThread;
40
41bool parseArguments(struct GBAArguments* opts, struct GBAConfig* config, int argc, char* const* argv, struct SubParser* subparser);
42void freeArguments(struct GBAArguments* opts);
43
44void usage(const char* arg0, const char* extraOptions);
45
46void initParserForGraphics(struct SubParser* parser, struct GraphicsOpts* opts);
47struct ARMDebugger* createDebugger(struct GBAArguments* opts, struct GBAThread* context);
48
49#endif