thermosphere: add more debugging strings

This commit is contained in:
TuxSH
2020-02-01 15:11:59 +00:00
parent eff433f62c
commit 6457dce5b1
5 changed files with 37 additions and 10 deletions

View File

@@ -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;
}