From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15028 invoked by alias); 4 Feb 2010 22:18:07 -0000 Received: (qmail 15019 invoked by uid 22791); 4 Feb 2010 22:18:06 -0000 X-Spam-Check-By: sourceware.org Received: from pool-173-76-58-83.bstnma.fios.verizon.net (HELO cgf.cx) (173.76.58.83) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 04 Feb 2010 22:18:02 +0000 Received: from ednor.cgf.cx (ednor.casa.cgf.cx [192.168.187.5]) by cgf.cx (Postfix) with ESMTP id A659613C0C8; Thu, 4 Feb 2010 17:17:52 -0500 (EST) Received: by ednor.cgf.cx (Postfix, from userid 201) id A2BBB2B35A; Thu, 4 Feb 2010 17:17:52 -0500 (EST) Date: Thu, 04 Feb 2010 22:18:00 -0000 From: Christopher Faylor To: gdb-patches@sourceware.org, Joel Brobecker Subject: Re: [RFA/windows] Spurious "dll not found" error messages on x64-windows. Message-ID: <20100204221752.GA27209@ednor.casa.cgf.cx> Mail-Followup-To: gdb-patches@sourceware.org, Joel Brobecker References: <1265256768-30183-1-git-send-email-brobecker@adacore.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1265256768-30183-1-git-send-email-brobecker@adacore.com> User-Agent: Mutt/1.5.20 (2009-06-14) 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/msg00143.txt.bz2 On Thu, Feb 04, 2010 at 08:12:48AM +0400, Joel Brobecker wrote: >When running 32bit programs on x64 windows, GDB produces the following >error messages: > > (gdb) start > Temporary breakpoint 1 at 0x4015ae: file simple_main.adb, line 4. > Starting program: C:\[...]/simple_main.exe > [New Thread 31464.0x8cd4] > !!! -> Error: dll starting at 0x77a60000 not found. > !!! -> Error: dll starting at 0x77650000 not found. > !!! -> Error: dll starting at 0x77a60000 not found. > !!! -> Error: dll starting at 0x77990000 not found. > > Temporary breakpoint 1, simple_main () at simple_main.adb:4 > 4 simple.test_simple; > >This is something that was already discussed previously for gdbserver, >where these events were not well handled and eventually lead to a crash: > http://www.sourceware.org/ml/gdb-patches/2010-02/msg00011.html > >A quick investigation showed that there were no dll-load-events that >correspond to these base addresses. A search on the net points at >the WOW layer which interfaces between the 32bit and 64bit worlds. > >My first proposal is to silently ignore these spurious events during >the startup phase. We could probably refine this check by also verifying >that we are running a 32bit exe on 64bit Windows. But given that this >error did not trigger in the past, I think that'd be overkill. In fact, >I don't think that ditching the error would be a big loss (we could turn >it into a complaint if we want to be able to see it in special occasions). > >gdb/ChangeLog: > > * windows-nat.c (handle_unload_dll): Disable unknown-dll error > during the inferior startup phase. > >Tested on x86_64-windows using a x86-windows compiler/debugger. >OK to apply? > >Thanks, >-- >Joel > >--- >diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c >index 2740366..4c2d1d8 100644 >--- a/gdb/windows-nat.c >+++ b/gdb/windows-nat.c >@@ -783,7 +783,16 @@ handle_unload_dll (void *dummy) > return 1; > } > >- error (_("Error: dll starting at %s not found."), >+ /* We did not find any DLL that was previously loaded at this address. >+ This is normally an error. However, we have observed that running >+ 32bit applications on x64 Windows causes us to receive 4 mysterious >+ UNLOAD_DLL_DEBUG_EVENTs during the startup phase. These events are >+ apparently caused by the WOW layer (this is the interface between >+ the 32bit and 64bit worlds). Because of these events, we only report >+ the error after the initialization phase is complete (there is not >+ much data that we can use to identify these spurious events). */ >+ if (windows_initialization_done) >+ error (_("Error: dll starting at %s not found."), > host_address_to_string (lpBaseOfDll)); > > return 0; Sorry but, I don't think this right. What's the point of issuing the error after inferior startup? I think it's only during startup that something like this would be useful. I think making the error a complaint makes more sense. cgf