This repository has been archived on 2022-05-31. You can view files and clone it, but cannot push or open issues or pull requests.
Luma3DS-3GX/sysmodules/rosalina/include/gdb/server.h

44 lines
1.1 KiB
C
Raw Normal View History

/*
* This file is part of Luma3DS.
2019-02-25 02:04:32 +01:00
* Copyright (C) 2016-2019 Aurora Wright, TuxSH
*
* SPDX-License-Identifier: (MIT OR GPL-2.0-or-later)
*/
#pragma once
#include "gdb.h"
#ifndef GDB_PORT_BASE
#define GDB_PORT_BASE 4000
#endif
typedef struct GDBServer
{
sock_server super;
s32 referenceCount;
Handle statusUpdated;
Handle statusUpdateReceived;
GDBContext ctxs[MAX_DEBUG];
} GDBServer;
Result GDB_InitializeServer(GDBServer *server);
void GDB_FinalizeServer(GDBServer *server);
void GDB_IncrementServerReferenceCount(GDBServer *server);
void GDB_DecrementServerReferenceCount(GDBServer *server);
void GDB_RunServer(GDBServer *server);
2019-03-31 01:12:22 +01:00
void GDB_LockAllContexts(GDBServer *server);
void GDB_UnlockAllContexts(GDBServer *server);
2019-03-31 00:24:45 +01:00
GDBContext *GDB_SelectAvailableContext(GDBServer *server, u16 minPort, u16 maxPort);
2019-04-10 23:17:49 +02:00
GDBContext *GDB_FindAllocatedContextByPid(GDBServer *server, u32 pid);
int GDB_AcceptClient(GDBContext *ctx);
int GDB_CloseClient(GDBContext *ctx);
GDBContext *GDB_GetClient(GDBServer *server, u16 port);
void GDB_ReleaseClient(GDBServer *server, GDBContext *ctx);
int GDB_DoPacket(GDBContext *ctx);