This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Make dg-extract-results.sh explicitly treat .{sum,log} files as text


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]