thermosphere: rewrite gdb/mem

This commit is contained in:
TuxSH 2020-01-24 00:52:55 +00:00
parent bd36796d5f
commit 58d52675cd
6 changed files with 95 additions and 245 deletions

View file

@ -262,7 +262,7 @@ int GDB_SendStopReply(GDBContext *ctx, const DebugEventInfo *info)
size_t sent = 0;
size_t total = 0;
while (remaining > 0) {
u32 pending = (GDB_BUF_LEN - 1) / 2;
size_t pending = (GDB_BUF_LEN - 1) / 2;
pending = pending < remaining ? pending : remaining;
int res = GDB_SendMemory(ctx, "O", 1, addr + sent, pending);