This is the mail archive of the
cygwin-patches@cygwin.com
mailing list for the Cygwin project.
Re: [Patch] debug_printf edits
At 02:36 PM 11/20/2004 -0500, Christopher Faylor wrote:
>On Sat, Nov 20, 2004 at 02:27:37PM -0500, Pierre A. Humblet wrote:
>>At 02:20 PM 11/20/2004 -0500, Christopher Faylor wrote:
>>>On Sat, Nov 20, 2004 at 01:51:16PM -0500, Pierre A. Humblet wrote:
>>>>Here are minor changes that facilitate grepping traces.
>>>>
>>>>Pierre
>>>>
>>>>2004-11-20 Pierre Humblet <pierre.humblet@ieee.org>
>>>>
>>>> * fhandler.cc (fhandler::write): Remove debug_printf.
>>>> * pipe.cc (fhandler_pipe::create): Edit syscall_printf format.
>>>
>>>What does the inclusion of the word "pipe" add for grepping traces?
>>>So, you can do a grep on '[0-9]+ = [a-z]'?
>>
>>Most syscall_printf have the form "res = function (args)",
>>but the one in pipe.cc is missing "function".
>>So the change facilitates grepping, in particular when looking
>>for many functions at once.
>
>It didn't make sense to me that you were removing this usage in the case
>of fhandler::write but tweaking it in the case of fhandler_pipe::create.
The debug_printf in fhandler::write is redundant because there is an
equivalent syscall_printf in write() (and a simple grep catches both).
Note that there is no debug_printf in many other fhandler_xxx::write.
Alternatively the debug_printf could be changed to avoid looking like a
syscall_printf (that's what's happening in fhandler::read).
Strictly speaking the syscall_printf in fhandler_pipe::create should be
removed, and reintroduced in both pipe and _pipe, but I thought this
would be going overboard.
Pierre