thermosphere: add more debugging strings
This commit is contained in:
1 parent
e1a8bdd495
commit
8f25d4f77f
5 files changed
+37
-10
No files matched your search
@@ -43,7 +43,7 @@
|
||||
#include "../watchpoints.h"
|
||||
|
||||
static TEMPORARY char g_gdbWorkBuffer[GDB_WORK_BUF_LEN];
|
||||
static TEMPORARY char g_gdbBuffer[GDB_BUF_LEN + 4];
|
||||
static TEMPORARY char g_gdbBuffer[GDB_BUF_LEN + 4 + 1];
|
||||
|
||||
static const struct{
|
||||
char command;
|
||||
|
||||
@@ -236,11 +236,14 @@ int GDB_ReceivePacket(GDBContext *ctx)
|
||||
ctx->state = GDB_STATE_ATTACHED;
|
||||
}
|
||||
|
||||
DEBUGRAW("->");
|
||||
DEBUGRAW(ctx->buffer);
|
||||
DEBUGRAW("\n");
|
||||
|
||||
// Set helper attributes, change '#' to NUL
|
||||
ctx->commandData = ctx->buffer + 2;
|
||||
ctx->commandEnd = ctx->buffer + delimPos;
|
||||
ctx->buffer[delimPos] = '\0';
|
||||
DEBUG("Packet: %s\n", ctx->buffer + 1);
|
||||
|
||||
return (int)(delimPos + 2);
|
||||
}
|
||||
@@ -249,6 +252,13 @@ static int GDB_DoSendPacket(GDBContext *ctx, size_t len)
|
||||
{
|
||||
transportInterfaceWriteData(ctx->transportInterface, ctx->buffer, len);
|
||||
ctx->lastSentPacketSize = len;
|
||||
|
||||
// Debugging:
|
||||
ctx->buffer[len] = 0;
|
||||
DEBUGRAW("<-");
|
||||
DEBUGRAW(ctx->buffer);
|
||||
DEBUGRAW("\n");
|
||||
|
||||
return (int)len;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user