cygserver debug output patch

Conrad Scott Conrad.Scott@dsl.pipex.com
Mon Jun 10 12:56:00 GMT 2002


I've made some changes to the cygserver code to "harmonize" the debugging
output. I've created a new header file, woutsup.h (and sorry for the bad
pun), for cygserver files compiled w/o __INSIDE_CYGWIN__ (i.e. outside the
cygwin dll).

This defines the same set of XXX_printf macros as does sys/strace.h: of
these, system_printf maps to a printf on stderr and the others ditto if the
DEBUGGING flag is given (i.e. --enable-debugging) and no-ops otherwise. They
also use __PRETTY_FUNCTION__ to give more information about the problem
location.

I've also added more debugging calls into the code, whenever I got really
lost, basically :-)

Apart from that, just a couple of minor changes to a pthread_once_t
initialisation and some pure virtual functions on the
cygserver_transport_base class.

I hope this is all fine (Robert et al). I'll continue with some more hacking
around fun. Umm . . . sorry, make that "careful development" :-)

Cheers.

// Conrad

p.s. I've attached the new "woutsup.h" file separately as I couldn't
convince cvs diff to put it into the patch file. I thought the -N flag
should do it, but I had no luck. Could someone give me a hint? Thanks.

2002-06-10  Conrad Scott  <conrad.scott@dsl.pipex.com>

 * cygserver.cc: Move to "woutsup.h". Use new XXX_printf functions
 throughout.
 * cygserver_client.cc: Ditto.
 * cygserver_process.cc: Ditto.
 (process_init): Initialise with PTHREAD_ONCE_INIT.
 * cygserver_shm.cc: Move to "woutsup.h". Use new XXX_printf
 functions throughout.
 * cygserver_transport.cc: Ditto.
 (transport_layer_base::transport_layer_base): Removed (redundant).
 (transport_layer_base::listen): Now pure virtual.
 (transport_layer_base::accept): Ditto.
 (transport_layer_base::close): Ditto.
 (transport_layer_base::read): Ditto.
 (transport_layer_base::write): Ditto.
 (transport_layer_base::connect): Ditto.
 * cygserver_transport_pipes.cc: Move to "woutsup.h". Use new
 XXX_printf functions throughout.
 * cygserver_transport_sockets.cc: Ditto.
 * threaded_queue.cc: Ditto.
 * woutsup.h: New file.
 * include/cygwin/cygserver_transport.h
 (transport_layer_base::transport_layer_base): Removed (redundant).
 (transport_layer_base::listen): Now pure virtual.
 (transport_layer_base::accept): Ditto.
 (transport_layer_base::close): Ditto.
 (transport_layer_base::read): Ditto.
 (transport_layer_base::write): Ditto.
 (transport_layer_base::connect): Ditto.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: winsup.patch
Type: application/octet-stream
Size: 38963 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin-patches/attachments/20020610/7d1bad0e/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: woutsup.h
Type: application/octet-stream
Size: 2595 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin-patches/attachments/20020610/7d1bad0e/attachment-0001.obj>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ChangeLog.txt
URL: <http://cygwin.com/pipermail/cygwin-patches/attachments/20020610/7d1bad0e/attachment.txt>


More information about the Cygwin-patches mailing list