This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] gdbserver crash when running 32bits executables on 64bits windows.
On Tuesday 02 February 2010 04:26:11, Joel Brobecker wrote:
> > > gdbserver/ChangeLog:
> > >
> > > * inferiors.c (find_inferior): Add function documentation.
> > > (unloaded_dll): Handle the case where the unloaded dll has not
> > > been previously registered in the dll list.
> >
> > Yuck. OK.
>
> My very same feeling as well.
Yuck indeed. Quick googling for UNLOAD_DLL_DEBUG_EVENT without LOAD_DLL_DEBUG_EVENT
shows this <http://www.eggheadcafe.com/software/aspnet/32206276/tracing-win32-application.aspx>:
"The other question is about UNLOAD_DLL_DEBUG_EVENT event.
Here is typical log from my tool:
LOAD_DLL_DEBUG_EVENT: base=77210000 C:\Windows\SysWOW64\ntdll.dll
UNLOAD_DLL_DEBUG_EVENT: base=76F40000
UNLOAD_DLL_DEBUG_EVENT: base=765E0000
UNLOAD_DLL_DEBUG_EVENT: base=76F40000
UNLOAD_DLL_DEBUG_EVENT: base=76E70000
LOAD_DLL_DEBUG_EVENT: base=765E0000 C:\Windows\SysWOW64\kernel32.dll
LOAD_DLL_DEBUG_EVENT: base=75930000 C:\Windows\SysWOW64\advapi32.dll
LOAD_DLL_DEBUG_EVENT: base=766F0000 C:\Windows\SysWOW64\rpcrt4.dll"
Goggling for "76F40000" (the first bad dll base), I saw
this <http://forum.tuts4you.com/index.php?showtopic=14887>,
site appears borked at the moment, but google cache worked:
<http://209.85.229.132/search?q=cache:WvuxhMlMHbsJ:forum.tuts4you.com/index.php%3Fshowtopic%3D14887+76F40000&cd=11&hl=en&ct=clnk>
"Anyway the problem during load is caused by 4 phantom UNLOAD_DLL_DEBUG_EVENT. These get
triggered just after the process has started. (...) See the logs:
(...)
This is just one of the problems on WOW."
Definitely sounds like a Windows/WOW bug. I'd be funny to see
if something like EnumProcessModules enumerates these
dlls before the UNLOAD events come through, but that's
just me. :-)
> Note that we have a milder version of this issue in GDB as well, as
> GDB emits a warning when receiving an unload event for an unknown DLL.
> I haven't started working on this warning, yet - I have other fish to
> fry, but it'll probably be coming soon.
>
> Thanks for the review,
--
Pedro Alves