This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Make format_pieces recognize the \e escape sequence
- From: Tom Tromey <tom at tromey dot com>
- To: Simon Marchi <simon dot marchi at ericsson dot com>
- Cc: <gdb-patches at sourceware dot org>
- Date: Thu, 17 May 2018 09:31:22 -0600
- Subject: Re: [PATCH] Make format_pieces recognize the \e escape sequence
- References: <1526564365-4036-1-git-send-email-simon.marchi@ericsson.com>
>>>>> "Simon" == Simon Marchi <simon.marchi@ericsson.com> writes:
Simon> I noticed that the printf command did not recognize the \e escape
Simon> sequence, used amongst other things to use colors:
Simon> (gdb) printf "This is \e[32mgreen\e[m!\n"
Simon> Unrecognized escape character \e in format string.
Simon> This patch makes format_pieces recognize it, which makes that command
Simon> print the expected result in glorious color.
Thanks. The patch looked reasonable to me.
Maybe this could be considered part of PR 14975.
Tom