Re: Colors in gdb

Robert Dewar
2013-01-20T15:29:45Z

On 1/20/2013 10:13 AM, Matt Rice wrote:

> maybe i'm old in not liking the idea of making these work with the
> standard 'print' command, because the escape sequences are terminal
> type dependent, which is IMO fine for a prompt set by a gdbinit, but
> less so for a pretty printer distributed with a library...
> this opinion is only strengthened by considering a std::string
> containing an escape sequence.

I strongly dislike ANY color stuff creeping into gdb output. Color
stuff is a big menace when stuff is saved to files, or pasted and
emailed etc etc.

> i'm fairly steadfast that just having random escape sequences embedded
> in pretty printers as i implemented it is entirely the wrong thing to
> do, and we need some level of indirection that can be set in .gdbinit
> that pretty printers can query

I agree