2017-06-05 02:02:04 +02:00
|
|
|
/*
|
2019-05-03 21:06:10 +02:00
|
|
|
* This file is part of Luma3DS.
|
2020-04-25 13:26:21 +01:00
|
|
|
* Copyright (C) 2016-2020 Aurora Wright, TuxSH
|
2017-06-05 02:02:04 +02:00
|
|
|
*
|
2019-05-03 21:06:10 +02:00
|
|
|
* SPDX-License-Identifier: (MIT OR GPL-2.0-or-later)
|
2017-06-05 02:02:04 +02:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include "gdb.h"
|
|
|
|
|
|
2022-04-08 23:47:31 +01:00
|
|
|
static inline u32 GDB_ConvertFromRealPid(u32 pid)
|
|
|
|
|
{
|
|
|
|
|
return pid + 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static inline u32 GDB_ConvertToRealPid(u32 pid)
|
|
|
|
|
{
|
|
|
|
|
return pid - 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const char *GDB_ParseThreadId(GDBContext *ctx, u32 *outPid, u32 *outTid, const char *str, char lastSep);
|
|
|
|
|
u32 GDB_ParseDecodeSingleThreadId(GDBContext *ctx, const char *str, char lastSep);
|
|
|
|
|
int GDB_EncodeThreadId(GDBContext *ctx, char *outbuf, u32 tid);
|
|
|
|
|
|
2017-06-05 02:02:04 +02:00
|
|
|
u32 GDB_GetCurrentThreadFromList(GDBContext *ctx, u32 *threadIds, u32 nbThreads);
|
|
|
|
|
u32 GDB_GetCurrentThread(GDBContext *ctx);
|
|
|
|
|
|
|
|
|
|
GDB_DECLARE_HANDLER(SetThreadId);
|
|
|
|
|
GDB_DECLARE_HANDLER(IsThreadAlive);
|
|
|
|
|
|
|
|
|
|
GDB_DECLARE_QUERY_HANDLER(CurrentThreadId);
|
|
|
|
|
GDB_DECLARE_QUERY_HANDLER(fThreadInfo);
|
|
|
|
|
GDB_DECLARE_QUERY_HANDLER(sThreadInfo);
|
|
|
|
|
GDB_DECLARE_QUERY_HANDLER(ThreadEvents);
|
|
|
|
|
GDB_DECLARE_QUERY_HANDLER(ThreadExtraInfo);
|
2017-06-19 16:04:19 +02:00
|
|
|
GDB_DECLARE_QUERY_HANDLER(GetTLSAddr);
|