Skip to content

Commit

Permalink
gdb_packet: add warning about string truncation on gdb_out
Browse files Browse the repository at this point in the history
  • Loading branch information
perigoso committed Dec 13, 2024
1 parent 6a90ad4 commit 568df9a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/include/gdb_packet.h
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,11 @@ void gdb_put_notification_str(const char *const str);
/* Formatted output */
void gdb_putpacket_str_f(const char *fmt, ...) GDB_FORMAT_ATTR;

/**
* Warning: gdb_(v)out(f) functions may truncate the output string if it is too long
* The output string is limited by the constant GDB_OUT_PACKET_MAX_SIZE derived from
* GDB_PACKET_BUFFER_SIZE. By default this is 511 characters.
*/
void gdb_out(const char *str);
void gdb_voutf(const char *fmt, va_list ap);
void gdb_outf(const char *fmt, ...) GDB_FORMAT_ATTR;
Expand Down

0 comments on commit 568df9a

Please sign in to comment.