start/stop logs by code... is it possible ?
Kai Blin
kai.blin at gmail.com
Thu Jul 3 01:32:24 CDT 2008
On Thursday 03 July 2008 01:36:43 Massimo Del Fedele wrote:
> 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 ?
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
--
Kai Blin
WorldForge developer http://www.worldforge.org/
Wine developer http://wiki.winehq.org/KaiBlin
Samba team member http://www.samba.org/samba/team/
--
Will code for cotton.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : http://www.winehq.org/pipermail/wine-devel/attachments/20080703/9d82e922/attachment.pgp
More information about the wine-devel
mailing list