start/stop logs by code... is it possible ?
Massimo Del Fedele
max at veneto.com
Wed Jul 2 18:36:43 CDT 2008
Rob Shearman ha scritto:
> 2008/7/1 Massimo Del Fedele <max at veneto.com>:
>> I'd like to start some trace log entering a function and stopping it at
>> exit, to isolate just the part I need. Is it possible to add some code
>> inside the function body that do it ?
>>
>> I mean...
>>
>> void aWineFunction(...)
>> {
>> .......
>> STARTLOG
>> .......
>> .......
>> STOPLOG
>>
>> .......
>>
>> }
>>
>> The purpose is to isolate traces from code called by a single function.
>
> Try these untested macros:
>
> #define STARTLOG(dbch) ((_wine_dbch_##dbch).flags |= (1 << __WINE_DBCL_TRA
> CE))
> #define STOPLOG(dbch) ((_wine_dbch_##dbch).flags &= ~(1 << __WINE_DBCL_TRA
> CE))
>
> And then use them like this:
> void aWineFunction(...)
> {
> .......
> STARTLOG(relay)
> .......
> .......
> STOPLOG(relay)
>
> .......
> }
>
>
Thanx for the answer !
What I'm interested for is a trace, not a relay... can it work for
traces too ? which would be the syntax then ?
Max
More information about the wine-devel
mailing list