libs/libc/gdbstub/lib_gdbstub.c: fix format for trap response

fix gdb crash after a few step breakpoints because trap is not correctly reported

Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
This commit is contained in:
p-szafonimateusz 2024-12-17 13:23:42 +01:00 committed by Xiang Xiao
parent 6b1be7c66c
commit 6f9d0c97d2

View file

@ -1609,7 +1609,7 @@ retry:
case GDB_STOPREASON_CTRLC:
default:
ret = sprintf(state->pkt_buf, "T05thread:%d;", state->pid + 1);
ret = sprintf(state->pkt_buf, "T05thread:%x;", state->pid + 1);
}
if (ret < 0)