aboutsummaryrefslogtreecommitdiff
path: root/gdb/command.h
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2018-09-05 11:25:28 -0600
committerTom Tromey <tom@tromey.com>2018-12-28 12:49:47 -0700
commitc5603d506350cca3b1af7ba3a97bf05adeea0508 (patch)
treec1c6e7d759ac207404e1735a14ee0290e9358b9b /gdb/command.h
parent94f2c73066597f33933bef2d20bdbfbf6fcd8b69 (diff)
downloadgdb-c5603d506350cca3b1af7ba3a97bf05adeea0508.zip
gdb-c5603d506350cca3b1af7ba3a97bf05adeea0508.tar.gz
gdb-c5603d506350cca3b1af7ba3a97bf05adeea0508.tar.bz2
Change wrap buffering to use a std::string
Currently wrap buffering is implemented by allocating a string that is the same width as the window, and then writing characters into it. However, if gdb emits terminal escapes, then these could possibly overflow the buffer. To prevent this, change the wrap buffer to be a std::string and update the various uses. This also changes utils.c to always emit characters to the wrap buffer. This simplifies future patches which emit terminal escape sequences, and also makes it possible for the "echo" and "printf" commands to be used to emit terminal escapes and have these work in the TUI. gdb/ChangeLog 2018-12-28 Tom Tromey <tom@tromey.com> * utils.c (filter_initialized): New global. (wrap_buffer): Now a std::string. (wrap_pointer): Remove. (flush_wrap_buffer): New function. (filtered_printing_initialized, set_width, wrap_here) (fputs_maybe_filtered): Update.
Diffstat (limited to 'gdb/command.h')
0 files changed, 0 insertions, 0 deletions