Uwe Bonnes wrote: > > Hallo, > > MingW as a crosscompiler is a nice tool for writing test programs with > wine or even do real win32 development work. Being able to single step > in the win32 source would be a win. However DEBUG_ParseStabs is > commented out in msc.c. The comment tells that some suff would be "a > bit difficult"... > > I remember some discussion about that with Marcus, but haven't found > the Mail Exchange yet. Is there some work lurking on that subject in > some private wine-tree, not yet released? Shouldn't be that "difficult" > stuff be already implemented in the mingw adaptation of gdb? Hi Uwe, to go further with mingw support, apply the attached patch and recompile the debugger dir with _WE_SUPPORT_THE_STAB_TYPES_USED_BY_MINGW_TOO defined this let at least symbol loading from gdis.exe (which current code doesn't allow :-( ), I was able to set a bp on WinMain, continue to it, and then single step... and then got a segv... (which doesn't appear when running without the debugger - strange) there's still some issue with global variables that will not be correctly handled (there's some comments and quirkies in debugger/stabs.c regarding ELF global variables (which mingw seems to handle slightly differently - look for N_GSYM in DEBUG_ParseStabs and at DEBUG_ProcessElfSymtab)) I don't intend to add this patch (without the #ifdef protection) to the CVS tree, because there's also quite some work to be done on symbol loading vs module loading (current code still assumes debugger and debuggee are in same address space), and still peruses the process PDB (with direct memory access) which shouldn't be. HTH -- --------------- Eric Pouech (http://perso.wanadoo.fr/eric.pouech/) "The future will be better tomorrow", Vice President Dan Quayle
Index: debugger/winedbg.c =================================================================== RCS file: /home/cvs/cvsroot/wine/wine/debugger/winedbg.c,v retrieving revision 1.3 diff -u -r1.3 winedbg.c --- debugger/winedbg.c 2000/03/10 22:25:07 1.3 +++ debugger/winedbg.c 2000/03/15 21:07:14 @@ -386,6 +388,11 @@ DEBUG_InitCurrProcess(); DEBUG_InitCurrThread(); +#ifdef _WE_SUPPORT_THE_STAB_TYPES_USED_BY_MINGW_TOO + /* so far, process name is not set */ + DEBUG_RegisterDebugInfo((DWORD)de.u.CreateProcessInfo.lpBaseOfImage, + "wine-exec"); +#endif break; case EXIT_THREAD_DEBUG_EVENT: