gdbstub: fix off-by-one in gdb_handle_packet()