Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <pedro@codesourcery.com>
To: gdb-patches@sourceware.org
Cc: Joel Brobecker <brobecker@adacore.com>
Subject: Re: [RFA] gdbserver crash when running 32bits executables on  64bits windows.
Date: Tue, 02 Feb 2010 11:28:00 -0000	[thread overview]
Message-ID: <201002021128.07293.pedro@codesourcery.com> (raw)
In-Reply-To: <20100202042611.GU26827@adacore.com>

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


      reply	other threads:[~2010-02-02 11:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-01 12:33 Joel Brobecker
2010-02-01 16:33 ` Daniel Jacobowitz
2010-02-02  4:26   ` Joel Brobecker
2010-02-02 11:28     ` Pedro Alves [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201002021128.07293.pedro@codesourcery.com \
    --to=pedro@codesourcery.com \
    --cc=brobecker@adacore.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox