Re: debugging my application

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

 



On Fri, 30 Nov 2001, Quentin wrote:

> My application seems to come up under wine; I get a window that comes up,
> but it never redraws, so I can't tell if my application has crashed or what
> is going on.  I would like to try to add in some printfs or other type of
> debug statements to my code to see what is going on.  How do I go about
> doing this?  Just adding printfs doesn't seem to do anything.  I don't see
> any debug statements coming up (where should I see them come up, in the
> console window?)  I know that wine and my app are running.

There is some work going on with wineconsole.  Last time I got the
debugger, it made its own huge console window.  Maybe msvcrt does the
same?
>
> Any ideas?
>
> Quentin.

Is printf a windows function?  msvcrt, crtdll, I guess if your app
imports one of those, it is, but I have no idea where it is spoze to
printf to.

Looks as if it should go to unix stdout, maybe.  If you use builtin
msvcrt, you could use --debugmsg +msvcrt and see what is happening to
those printfs.  If you use native msvcrt, use debugmsg +snoop, I guess.
What are you compiling your app with?
Are you still using a windows compiler, or did you give it to winemaker
as I suggested?  Anyway, the "right" thing to do is to use the windows
debugging API, I think wine implements most of it.

Hmmm, if you use console functions (I guess printf would be one), I
think you are meant to use wineconsole to run them instead of wine.
This gives you a separate console window.  I don't have any apps handy
that do this console output, and I haven't gotten around to making one.
C is not my native language, (I learned programming before there were
little-endian machines or compilers), and the windose api is even less
to my liking.

Maybe that will help.

try wineconsole myapp.exe

or if you compiled your app as a winelib program,

WINEPRELOAD=myapp.so wineconsole

If you have a current wine (CVS of 24 November or later, I think) this
may work.  Maybe it is not that new.  It is already in man wine :-)

Lawson
---oof---


________________________________________________________________
GET INTERNET ACCESS FROM JUNO!
Juno offers FREE or PREMIUM Internet access for less!
Join Juno today!  For your FREE software, visit:
http://dl.www.juno.com/get/web/.



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

  Powered by Linux