make it possible to change gdb stub settings without destroying/recreating a NDS

This commit is contained in:
Arisotura
2024-11-17 20:00:52 +01:00
parent 99aa5676db
commit 0ea0af3abf
7 changed files with 41 additions and 17 deletions

View File

@ -51,16 +51,17 @@ static int SocketSetBlocking(int fd, bool block)
namespace Gdb
{
GdbStub::GdbStub(StubCallbacks* cb, int port)
: Cb(cb), Port(port)
GdbStub::GdbStub(StubCallbacks* cb)
: Cb(cb), Port(0)
, SockFd(0), ConnFd(0)
, Stat(TgtStatus::None), CurBkpt(0), CurWatchpt(0), StatFlag(false), NoAck(false)
, ServerSA((void*)new struct sockaddr_in())
, ClientSA((void*)new struct sockaddr_in())
{ }
bool GdbStub::Init()
bool GdbStub::Init(int port)
{
Port = port;
Log(LogLevel::Info, "[GDB] initializing GDB stub for core %d on port %d\n",
Cb->GetCPU(), Port);