Skip to content

Commit

Permalink
gdb_main: Fixed a small DEBUG_GDB regression for vFlashErase and vFla…
Browse files Browse the repository at this point in the history
…shWrite debugging
  • Loading branch information
dragonmux committed Jul 21, 2022
1 parent fc55400 commit 5cd4306
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/gdb_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,7 @@ static void handle_v_packet(char *packet, const size_t plen)

} else if (sscanf(packet, "vFlashErase:%08" PRIx32 ",%08" PRIx32, &addr, &len) == 2) {
/* Erase Flash Memory */
DEBUG_GDB("Flash Erase %08zX %08zX\n", addr, len);
DEBUG_GDB("Flash Erase %08" PRIX32 " %08" PRIX32 "\n", addr, len);
if (!cur_target) {
gdb_putpacketz("EFF");
return;
Expand All @@ -624,8 +624,8 @@ static void handle_v_packet(char *packet, const size_t plen)

} else if (sscanf(packet, "vFlashWrite:%08" PRIx32 ":%n", &addr, &bin) == 1) {
/* Write Flash Memory */
const size_t count = plen - bin;
DEBUG_GDB("Flash Write %08zX %08zX\n", addr, count);
const uint32_t count = plen - bin;
DEBUG_GDB("Flash Write %08" PRIX32 " %08" PRIX32 "\n", addr, count);
if (cur_target && target_flash_write(cur_target, addr, (void*)packet + bin, count) == 0)
gdb_putpacketz("OK");
else {
Expand Down

0 comments on commit 5cd4306

Please sign in to comment.