Re: [AD] sys_directx_trace_handler

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On Thu, 2005-04-28 at 08:59 +0200, Daniel Schlyder wrote:
> Elias Pschernig:
> > It says:
> 
> > "If the application has no debugger, the system debugger displays the
> > string. If the application has no debugger and the system debugger is not
> > active, OutputDebugString does nothing."
> 
> If I run a program under GDB (MinGW, Windows CLI), I get output of
> OutputDebugString(), so I guess sys_directx_trace_handler() makes sense
> then? We've also got the _TRACE() macro for that, so I'm a bit confused
> here.

I see. Doesn't help at all if I have to debug a fullscreen app on a
single-monitor machine though, or as in my case, can only reproduce the
problem by starting a program a few 100 times from a script until it
hangs, and then attach with gdb to the running process.

> > The docs for al_trace:
> 
> > "Outputs a debugging trace message, using a printf() format string given
> > in ASCII. If you have installed a custom trace handler it uses that, or if
> > the environment variable ALLEGRO_TRACE is set it writes into the file
> > specified by the environment, otherwise it writes the message to
> > "allegro.log" in the current directory. You will usually want to use the
> > TRACE() macro instead of calling this function directly."
> 
> Note that _TRACE() and TRACE() behave differently.
> 

I see. I don't find it useful though - TRACE was made exactly for what
_TRACE is used here. Guess the best thing to do would be a config
option, which either makes _TRACE behave like TRACE, or like now.. I'll
add it next time I have to debug something in windows (instead of simply
removing it as I did this time).

-- 
Elias Pschernig





Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/