From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18414 invoked by alias); 9 Dec 2013 11:33:44 -0000 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 Received: (qmail 18403 invoked by uid 89); 9 Dec 2013 11:33:43 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.2 X-HELO: rock.gnat.com Received: from Unknown (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Mon, 09 Dec 2013 11:33:43 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id F3366116475; Mon, 9 Dec 2013 06:34:13 -0500 (EST) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id FPniPZb+-PQM; Mon, 9 Dec 2013 06:34:13 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id C6CD1116470; Mon, 9 Dec 2013 06:34:13 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id DE589E16B7; Mon, 9 Dec 2013 12:33:33 +0100 (CET) Date: Mon, 09 Dec 2013 11:33:00 -0000 From: Joel Brobecker To: Pedro Alves Cc: gdb-patches@sourceware.org Subject: Re: [RFA] nameless LOAD_DLL_DEBUG_EVENT causes ntdll.dll to be missing Message-ID: <20131209113333.GC4011@adacore.com> References: <1386070185-8020-1-git-send-email-brobecker@adacore.com> <529E361B.7070807@redhat.com> <20131205105437.GE3175@adacore.com> <52A073CC.3050009@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <52A073CC.3050009@redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-SW-Source: 2013-12/txt/msg00331.txt.bz2 > :-) I'd be good to have this new info distilled as a comment > in the code, IMO. Excellent suggestion, of course. I, with my incessant asking for comments, should have thought of it too! ;-) [regarding gdbserver] > I think the fix is very low risk, and could go in with minimal > testing. OK - will work on that ASAP. > > In the meantime, does the GDB-side fix look OK to commit to you > > (modulo the small issue you raised)? > > Yes. > > One nit -- does ntdll.dll appears at the end of the > loaded list with this fix, or at the beginning? I'd think > it should be the first dll in "info sharedlibrary", assuming > that that's what we see on older Windows versions. I think this is going to be difficult, unless we defer the notification for the other shared libraries - in which case we're doing what I wanted to do, but after 7.7 gets cut, which is to ignore LOAD_DLL_DEBUG_EVENTs until the end of do_initial_windows_stuff, and then just iterate over all modules to generate the SOs. The reason why I think it would be difficult is because, when a new shared object is loaded, we get a TARGET_WAITKIND_LOADED, which I think eventually leads us to: -> handle_solib_event () -> solib_add (NULL, 0, ¤t_target, auto_solib_add); -> update_solib_list (from_tty, target); And looking at update_solib_list, it calls current_sos, and then adds new SOs at the end (via the VEC_push). On top of that, an easier issue that we'll have to handle in windows-nat the adding of the new SO at the start of the SO list, rather than then end. Since this is mostly cosmetic and only affects Windows 2012, I would leave it alone until we have more leeway towards simplifying the DLL handling. -- Joel