XuNeo commented on code in PR #15623: URL: https://github.com/apache/nuttx/pull/15623#discussion_r1923127761
########## libs/libc/gdbstub/lib_gdbstub.c: ########## @@ -283,9 +287,43 @@ static int gdb_putchar(FAR struct gdb_state_s *state, int ch) return ret; } + if (csum) + { + *csum += tmp; + } + return tmp; } +/**************************************************************************** + * Name: gdb_escapechar + * + * Description: + * Send out a char, do escaping if necessary. + * Do note that for RLE encoded data, the length byte should NOT escape. + * See gdb src of remote.c remote_target::read_frame + * + * Input Parameters: + * state - The pointer to the GDB state structure. + * ch - The character to be sent. + * csum - The checksum. + * + ****************************************************************************/ + +static void gdb_escapechar(FAR struct gdb_state_s *state, char c, + FAR char *csum) +{ + if (c == '#' || c == '$' || c == '}' || c == '*') Review Comment: Done -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org