This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC 1/8] Change wrap buffering to use a std::string
- From: Tom Tromey <tom at tromey dot com>
- To: Simon Marchi <simark at simark dot ca>
- Cc: Tom Tromey <tom at tromey dot com>, gdb-patches at sourceware dot org
- Date: Mon, 08 Oct 2018 16:04:26 -0600
- Subject: Re: [RFC 1/8] Change wrap buffering to use a std::string
- References: <20180906211303.11029-1-tom@tromey.com> <20180906211303.11029-2-tom@tromey.com> <9ac8cf66-040e-b11a-841b-4d378b256f8a@simark.ca>
>>>>> "Simon" == Simon Marchi <simark@simark.ca> writes:
>> 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.
Simon> This looks like a good change to me, independently of this series. I think you
Simon> should push it right away.
FWIW I think this patch will have to change to accommodate Windows -- or
at least be totally obsoleted by the needed change. My plan is to have
a vector holding strings with their styling. This has to happen because
styling on Windows is done via an API, not via an escape sequence.
Tom