On Thursday 03 July 2008 01:36:43 Massimo Del Fedele wrote:
Rob Shearman ha scritto:
2008/7/1 Massimo Del Fedele max@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 ?
STARTLOG() turns on a debug channel, in this case the relay debug channel. Simply replace the relay with whichever debug channel you're interested in.
Kai