2014-02-10 18:54:46 +00:00
|
|
|
// Copyright 2014 Dolphin Emulator Project
|
|
|
|
// Licensed under GPLv2
|
|
|
|
// Refer to the license.txt file included.
|
2013-01-06 10:28:27 +00:00
|
|
|
|
|
|
|
// Originally written by Sven Peter <sven@fail0verflow.com> for anergistic.
|
|
|
|
|
2014-02-10 18:54:46 +00:00
|
|
|
#pragma once
|
2013-01-06 10:28:27 +00:00
|
|
|
|
|
|
|
#include <signal.h>
|
2014-02-17 10:18:15 +00:00
|
|
|
|
2014-09-08 01:06:58 +00:00
|
|
|
#include "Common/CommonTypes.h"
|
2014-02-17 10:18:15 +00:00
|
|
|
#include "Common/Thread.h"
|
|
|
|
|
|
|
|
#include "Core/HW/CPU.h"
|
|
|
|
#include "Core/HW/Memmap.h"
|
|
|
|
#include "Core/PowerPC/PowerPC.h"
|
2013-01-06 10:28:27 +00:00
|
|
|
|
|
|
|
#ifdef _WIN32
|
2014-02-16 20:30:18 +00:00
|
|
|
#define SIGTRAP 5
|
|
|
|
#define SIGTERM 15
|
2013-01-06 10:28:27 +00:00
|
|
|
#define MSG_WAITALL 8
|
|
|
|
#endif
|
|
|
|
|
|
|
|
typedef enum {
|
|
|
|
GDB_BP_TYPE_NONE = 0,
|
|
|
|
GDB_BP_TYPE_X,
|
|
|
|
GDB_BP_TYPE_R,
|
|
|
|
GDB_BP_TYPE_W,
|
|
|
|
GDB_BP_TYPE_A
|
|
|
|
} gdb_bp_type;
|
|
|
|
|
|
|
|
void gdb_init(u32 port);
|
2015-05-04 23:15:16 +00:00
|
|
|
void gdb_init_local(const char *socket);
|
2013-01-06 10:28:27 +00:00
|
|
|
void gdb_deinit();
|
|
|
|
bool gdb_active();
|
2013-01-08 07:56:26 +00:00
|
|
|
void gdb_break();
|
2013-01-06 10:28:27 +00:00
|
|
|
|
2013-01-08 07:26:07 +00:00
|
|
|
void gdb_handle_exception();
|
2013-01-06 10:28:27 +00:00
|
|
|
int gdb_signal(u32 signal);
|
|
|
|
|
|
|
|
int gdb_bp_x(u32 addr);
|
|
|
|
int gdb_bp_r(u32 addr);
|
|
|
|
int gdb_bp_w(u32 addr);
|
|
|
|
int gdb_bp_a(u32 addr);
|
|
|
|
|
|
|
|
bool gdb_add_bp(u32 type, u32 addr, u32 len);
|