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)
....... }