From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4012 invoked by alias); 2 Feb 2010 11:28:13 -0000 Received: (qmail 3999 invoked by uid 22791); 2 Feb 2010 11:28:12 -0000 X-SWARE-Spam-Status: No, hits=-1.5 required=5.0 tests=AWL,BAYES_00,KAM_BADIPHTTP,NORMAL_HTTP_TO_IP,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 02 Feb 2010 11:28:08 +0000 Received: (qmail 20159 invoked from network); 2 Feb 2010 11:28:07 -0000 Received: from unknown (HELO orlando) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 2 Feb 2010 11:28:07 -0000 From: Pedro Alves To: gdb-patches@sourceware.org Subject: Re: [RFA] gdbserver crash when running 32bits executables on 64bits windows. Date: Tue, 02 Feb 2010 11:28:00 -0000 User-Agent: KMail/1.9.10 Cc: Joel Brobecker References: <1265027586-18928-1-git-send-email-brobecker@adacore.com> <20100201163307.GE21339@caradoc.them.org> <20100202042611.GU26827@adacore.com> In-Reply-To: <20100202042611.GU26827@adacore.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <201002021128.07293.pedro@codesourcery.com> X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2010-02/txt/msg00040.txt.bz2 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 : "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 , site appears borked at the moment, but google cache worked: "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