This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Escape non-printable chars in dumped strings.
On Fri, Dec 9, 2016 at 11:05 AM, Martin Liška <mliska@suse.cz> wrote:
> On 12/09/2016 11:00 AM, Richard Biener wrote:
>> On Thu, Dec 8, 2016 at 2:37 PM, Martin Liška <mliska@suse.cz> wrote:
>>> Hello.
>>>
>>> Following patch changes behavior in pretty_print_string, where all non-printable
>>> characters are encoded as \x%x. Currently, when some non-printable characters are directly
>>> printed to a dump file stream. That makes it complicated to read a dump file for instance
>>> via a Python script.
>>>
>>> Patch can bootstrap on ppc64le-redhat-linux and survives regression tests.
>>>
>>> Ready to be installed?
>>
>> Ok. Does ISPRINT ('\') yield true or false? That is, I suppose we
>> want to escape that?
>
> You mean '\\', which is already covered by a case:
>
> case '\\':
> pp_string (pp, "\\\\");
> break;
Ah, I see.
> I'm going to install the patch.
Thanks.
> Martin
>
>
>>
>>> Martin
>