Let the GDB stub listen for commands while running

This is needed to send ctrl+C signals while the CPU thread is running.
This commit is contained in:
aldelaro5
2021-09-29 12:57:46 -04:00
parent 39569ed1f8
commit e03ddc2116
3 changed files with 30 additions and 4 deletions

View File

@ -6,6 +6,7 @@
#pragma once
#include "Common/CommonTypes.h"
#include "Core/CoreTiming.h"
#ifndef MSG_WAITALL
#define MSG_WAITALL (8)
@ -26,13 +27,17 @@ typedef enum
GDB_BP_TYPE_A
} gdb_bp_type;
const s64 GDB_UPDATE_CYCLES = 100000;
void GDBStubUpdateCallback(u64 userdata, s64 cycles_late);
void gdb_init(u32 port);
void gdb_init_local(const char* socket);
void gdb_deinit();
bool gdb_active();
void gdb_break();
void gdb_handle_exception();
void gdb_handle_exception(bool loopUntilContinue);
int gdb_signal(u32 signal);
int gdb_bp_x(u32 addr);
@ -41,3 +46,6 @@ int gdb_bp_w(u32 addr);
int gdb_bp_a(u32 addr);
bool gdb_add_bp(u32 type, u32 addr, u32 len);
void gdb_handle_exception(bool loop_until_continue);
void SendSignal(u32 signal);
} // namespace GDBStub