mirror of
https://github.com/Atmosphere-NX/Atmosphere
synced 2024-11-15 09:36:35 +00:00
thermosphere: introduce GDB_TEST_NO_CMD_DATA
This commit is contained in:
parent
dd7f0b805b
commit
ff2c835b0a
3 changed files with 15 additions and 7 deletions
|
@ -44,3 +44,5 @@
|
|||
#define GDB_DEFINE_VERBOSE_HANDLER(name) GDB_DEFINE_HANDLER(Verbose##name)
|
||||
#define GDB_DEFINE_REMOTE_COMMAND_HANDLER(name) GDB_DEFINE_HANDLER(RemoteCommand##name)
|
||||
#define GDB_DECLARE_XFER_HANDLER(name) GDB_DEFINE_HANDLER(Xfer##name)
|
||||
|
||||
#define GDB_TEST_NO_CMD_DATA() do { if (!m_commandData.empty()) return ReplyErrno(EILSEQ); } while (false)
|
||||
|
|
|
@ -75,6 +75,7 @@ namespace ams::hvisor::gdb {
|
|||
GDB_DEFINE_HANDLER(ReadRegisters)
|
||||
{
|
||||
ENSURE(m_selectedCoreId == currentCoreCtx->coreId);
|
||||
GDB_TEST_NO_CMD_DATA();
|
||||
|
||||
ExceptionStackFrame *frame = currentCoreCtx->guestFrame;
|
||||
FpuRegisterCache *fpuRegCache = fpuReadRegisters();
|
||||
|
|
|
@ -96,11 +96,14 @@ namespace ams::hvisor::gdb {
|
|||
|
||||
GDB_DEFINE_QUERY_HANDLER(CurrentThreadId)
|
||||
{
|
||||
GDB_TEST_NO_CMD_DATA();
|
||||
return SendFormattedPacket("QC%x", 1 + currentCoreCtx->coreId);
|
||||
}
|
||||
|
||||
GDB_DEFINE_QUERY_HANDLER(fThreadInfo)
|
||||
{
|
||||
GDB_TEST_NO_CMD_DATA();
|
||||
|
||||
// We have made our GDB packet big enough to list all the thread ids (coreIds + 1 for each coreId)
|
||||
char *buf = GetInPlaceOutputBuffer();
|
||||
size_t n = 0;
|
||||
|
@ -117,6 +120,8 @@ namespace ams::hvisor::gdb {
|
|||
|
||||
GDB_DEFINE_QUERY_HANDLER(sThreadInfo)
|
||||
{
|
||||
GDB_TEST_NO_CMD_DATA();
|
||||
|
||||
// We have made our GDB packet big enough to list all the thread ids (coreIds + 1 for each coreId) in fThreadInfo
|
||||
// Note: we assume GDB doesn't accept notifications during the sequence transfer...
|
||||
return SendPacket("l");
|
||||
|
|
Loading…
Reference in a new issue