Re: debugging my application

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 3 Dec 2001, Quentin wrote:

> No printf isn't a windows function, I was just wondering if there was a way
> I could send text messages to stdout.  I got a better idea, if I use
> "OutputDebugString" (which is a windows function) will that output debug
> messages if I use '--debugmsg +relay'?

AFAIK --debugmsg controls wine's internal debug messages.  I think I
mentioned, or maybe one of us forgot, these can be quite useful in
debugging an app.  +relay will show every call your app makes to a wine
builtin dll, and what it gets back.  +snoop will do the same for native
windows dll's.  You can tune them to include or exclude certain modules
or functions.  This might not be current, but I've used it to filter out
some of the noise in relay traces:

[whit@giftie whit]$ printenv|grep relay
relay=-relay=rtlentercriticalsection:RTLleavecriticalsection:rtldeletecriticalsection:initializecriticalsection:interlockedincrement:interlockeddecrement

once you export something like that, you can use --debugmsg $relay

I _think_ OutputDebugString will come out on a wine console, meaning you
should run your app with wineconsole rather than wine.  This doesn't
seem to interfere with the GUI, it just makes a separate console window.

> I have been trying both compiling with Visual C++ 6.0 and trying to use
> winemaker (so far only compiling with VC++ is showing any fruit.)

One of the tricks to winemaker is to get the .spec file[s] right.
winemaker tries to generate one, to the extent of importing things you
don't need, but it might not catch everything you do need.  don't be
afraid to tune .spec files by hand.  You won't hurt winemaker's
feelings, and you can tell it --nogenerated-specs if you need to run
winemaker again after you have started changing them.
>
> Yeah, I have come to realize this, I guess my idea of using printf was a
> little dumb :(

You can use unix functions it a Winelib program, but you are not spoze
to.  Basically it is not supported to do so.  There are an awful lot of
collisions if you put msvcrt or crtdll in the same namespace as the unix
C library.  I can do it because I don't import either of those, and I'm
not familiar with windose anyway.  If you are still using VC++, of
course, you don't have a Winelib program yet.
>
> Thanks for all your suggestions, you've been very helpful,
> Quentin.
>
Lawson

I haven't lost my mind -- it's backed up on tape somewhere.




[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux