This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Make dg-extract-results.sh explicitly treat .{sum,log} files as text
- From: Pedro Alves <palves at redhat dot com>
- To: Mike Stump <mikestump at comcast dot net>, Sergio Durigan Junior <sergiodj at redhat dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 16 Dec 2014 10:27:53 +0000
- Subject: Re: [PATCH] Make dg-extract-results.sh explicitly treat .{sum,log} files as text
- Authentication-results: sourceware.org; auth=none
- References: <1418683023-26087-1-git-send-email-sergiodj at redhat dot com> <0B13F311-5EC9-4658-86A3-A97A9BD57AFB at comcast dot net>
On 12/16/2014 10:03 AM, Mike Stump wrote:
>> > input_interrupt, count = 0 c = 0 ('^@')
>> >
>> > (The ^@ above is the NUL byte.)
> So, either, the tool should not generate 0 in the output, which, is rather anti-social,
Yeah, this is actually a gdbserver debug output that misses an "if debugging"
guard; it shouldn't be printed by default. Still, if we do enable debug output,
I agree we shouldn't be printing unprintable characters.
Sergio, if you want to work on that, see serial_logchar
and the use of isprint. Also, count==0 means the connection was closed; it'd
be better even if in addition to isprint, we add a special case that
logs "client connection closed" or some such instead of printing whatever
was in 'c', which happens to be \0.
or one should strip the funny characters in a more portable fashion.
Thanks,
Pedro Alves