source level debugging with WineLib? (ADDED: ATL patches?)

Geoff K. Hart ghart at siemens-emis.com
Wed Nov 3 15:07:49 CST 2004


(Boaz - I also saw that your are the author of a set of
patches for ATL & MFC - is there a set of 20041019 that
I can pickup someplace?  Especially for "__uuidof")

On Wed, 2004-11-03 at 09:34 +0200, Boaz Harrosh wrote:
> Geoff K. Hart wrote:
> 
> >Hello,
> >
> >We just started using WineLib, and have very basic question:
> >
> >  which -g??? option do you use to do source level debugging
> >  with winedbg?
> >
> There is no point in struggling with winedbg, with a winelib. wine and 
> winelib apps can be fully debugged with gdb.

OK - that's great news.  However, could you illustrate this technique
a bit more?    I'm running on FC2, using the 1019 version of wine.  So I
presume it's pthreads?  Here's more evidence:

[spsy at hulk DDSServer2]$ ps -ef|grep wine
spsy     30660     1  0 09:56 ?        00:00:00 /usr/bin/wineserver
spsy     30662 29425  0 09:56 pts/12   00:00:00 /usr/bin/wine-
preloader /usr/bin/wine-pthread ./ddsserver2.exe.so

That's when I start the app in the normal way (ddsserver2 is the app).
I just rebuilt the app with "-g" (manually added in the Makefile).

I tried:

[spsy at hulk windows]$ gdb --pid=30662
GNU gdb Red Hat Linux (6.0post-0.20040223.19rh)
[ ... header deleted ... ]
Attaching to process 30662
Reading symbols from /usr/bin/wine-preloader...(no debugging symbols
found)...done.
Using host libthread_db library "/lib/tls/libthread_db.so.1".
0x15aee7a2 in ?? ()
(gdb) bt
#0  0x15aee7a2 in ?? ()
#1  0x100e4221 in ?? ()
#2  0x101c8244 in ?? ()
#3  0x00000000 in ?? ()
(gdb)

Looks like I didn't start things up in the right manner.

> - have all the right command line parameters to invoke your winelib
app. 
> If you have environment variables need set do that before you run the 
> debugger or at the debugger before the app is loaded. In kdevelop
there 
> is a nice settings dialog to set all these things once.
> Actually one of the points of a winelib is that you can use the
native 
> debugger.

I will try kdevelop (and also Eclipse) later, but I want to get plain
gdb working first (if possible).

thanks!
Geoff

p.s. here's what winedbg says (does the fact that the app is running
     3 threads matter?)
[spsy at hulk windows]$ winedbg
Wine-dbg>process info
No process loaded, cannot execute 'process info'
Wine-dbg>info process
 pid      threads  parent   executable (all id:s are in hex)
 0000000a 3        00000000 'Z:\home\s\src\SysSrv
\DataDistributionService\DDSServer2\ddsserver2.exe'
Wine-dbg>attach 10
In 32 bit mode.
0x15aee7a2: ret
Wine-dbg>bt
Backtrace:
=>1 0x15aee7a2 (0x2453ec50)
  2 0x101b1a7e NTDLL_wait_for_multiple_objects+0x12e in ntdll
(0x2453ecf8)
  3 0x101affec vm86_return_end+0xc55 in ntdll (0x2453ed1c)
  4 0x15365808 (0x10872d64)
  5 0x101b1a7e NTDLL_wait_for_multiple_objects+0x12e in ntdll
(0x10872e0c)
  6 0x101b1afc NtWaitForMultipleObjects+0x6c in ntdll (0x10872e30)
  7 0x1038ca95 WaitForMultipleObjectsEx+0xb5 in kernel32 (0x10872f60)
  8 0x1038c97b WaitForSingleObjectEx+0x3b in kernel32 (0x10872f80)
  9 0x1298c78afixme:dbghelp:elf_load_debug_info_from_file Unsupported
Dwarf2 information for ddsserver2<elf>
 _Z13DDSServerMainPv+0x88 in ddsserver2 (0x10873150)
  10 0x10393eda (0x10873228)
  11 0x101b3523 (0x10873a78)
  12 0x1535f08d (0x10873b0c)
  13 0x100ed55a (0x00000000)
Wine-dbg>





More information about the wine-devel mailing list