Code::Blocks Forums

User forums => General (but related to Code::Blocks) => Topic started by: zabzonk on August 09, 2012, 05:55:58 pm

Title: Support for OutputDebugString
Post by: zabzonk on August 09, 2012, 05:55:58 pm
I'm writing a blog article on debugging techniques at the moment, and one of the things I want to cover is the Windows OutputDebugString API. I thought that the C::B debugger allowed you to see messages generated by this, but I guess I was mistaken or hallucinating, as a fairly recent nightly doesn't seem to. Is there any way of displaying messages generated this way, possibly by a plugin?
Title: Re: Support for OutputDebugString
Post by: oBFusCATed on August 09, 2012, 06:01:35 pm
Search MSDN how to do it, then we can try to think something about it.
Other option is to talk to the MinGW developers if they know something about this problem and if it is possible to modify gdb to print the information in its output.
Title: Re: Support for OutputDebugString
Post by: zabzonk on August 09, 2012, 06:10:33 pm
Quote
Search MSDN how to do it, then we can try to think something about it.

I know how it works - basically it writes to a memory mapped file protected by a mutex, which the debugger then needs to read. I just wondered if C::B supported it. Not a problem if it doesn't from my blog articles perspective. If anyone else here is wondering how to display the ODS messages, you can use a tool like DebugView at http://technet.microsoft.com/en-us/sysinternals/bb896647.aspx
Title: Re: Support for OutputDebugString
Post by: zabzonk on August 09, 2012, 08:22:40 pm
Blog article is  at http://latedev.wordpress.com/2012/08/09/c-debug-macros/ if anyone is interested.
Title: Re: Support for OutputDebugString
Post by: ollydbg on August 30, 2012, 05:19:32 pm
Your article is quite good, but I think that if the gdb can receive the messages you send to, it will probably mess up the debugger's output parser.

I see such issue: Re: Debugger plugin: GDB MI interface features and issues (http://forums.codeblocks.org/index.php/topic,16230.msg113592.html#msg113592), the message from wxLogMessage will shown in the gdb console, and in-fact, I don't like them.