News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

Support for OutputDebugString

Started by zabzonk, August 09, 2012, 05:55:58 PM

Previous topic - Next topic

zabzonk

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?

oBFusCATed

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.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

zabzonk

QuoteSearch 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


ollydbg

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, the message from wxLogMessage will shown in the gdb console, and in-fact, I don't like them.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.