Pelles C forum

C language => User contributions => Topic started by: frankie on May 16, 2013, 04:56:01 PM

Title: Debug strings reader
Post by: frankie on May 16, 2013, 04:56:01 PM
During development with COM objects the debugger often hangs.  >:(
This is very annoying so I wrote a small tool to read the debugging informations without using the debugger.
Be aware that this tool use standard techniques slowing a bit all processes that emit an 'OutputDebugString'.
PellesC debugger use a different system, but this is a simple tool after all.....  ::)

EDIT: Small fixing.
Title: Re: Debug strings reader
Post by: TimoVJL on May 16, 2013, 05:40:29 PM
Works in ubuntu wine too !
During development with COM objects the debugger often hangs.  >:(
This is very annoying so I wrote a small tool to read the debugging informations without using the debugger.
Be aware that this tool use standard techniques slowing a bit all processes that emit an 'OutputDebugString'.
PellesC debugger use a different system, but this is a simple tool after all.....  ::)
DbgView is similar tool.
During development with COM objects the debugger often hangs.  >:(
This is very annoying ...
Yes it is, looks like it lost threads ?. Sometimes debug Break - Continue helps.
Title: Re: Debug strings reader
Post by: frankie on May 16, 2013, 05:57:44 PM
Works in ubuntu wine too !
Great!  :)

DbgView is similar tool.

Yes I know, but here we have sources and it can be tailored for personal preferences....  ;)
Title: Re: Debug strings reader
Post by: czerny on May 16, 2013, 08:30:05 PM
Here is a little log/debug tool that I wrote. Maybe it is a little bit usefull.
Title: Re: Debug strings reader
Post by: frankie on May 17, 2013, 09:57:40 AM
Hi czerny,
you can try to integrate the logging in debugreader, but if you do so consider that, due to handshaking, while the reader is processing the string the target program is stopped waiting for transaction to complete.
This means that more time takes the reader more slow runs the target program.
A solution could be a large circular buffer used as double buffering:
1) for each debug string copy immediatly the debug buffer in the circular buffer and release handshaking.
2) In another thread process strings in the circular buffer.
It is not easy anyway because you have to synchronize buffer access on multithreaded basis, and manage buffer overrun conditions that can happen.