From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22298 invoked by alias); 18 Dec 2014 18:00:02 -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 22205 invoked by uid 89); 18 Dec 2014 17:59:58 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Thu, 18 Dec 2014 17:59:58 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id sBIHxofT022951 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 18 Dec 2014 12:59:51 -0500 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id sBIHxmm7001631; Thu, 18 Dec 2014 12:59:49 -0500 Message-ID: <54931613.5000006@redhat.com> Date: Thu, 18 Dec 2014 18:00:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Eli Zaretskii CC: jan.kratochvil@redhat.com, brobecker@adacore.com, yao@codesourcery.com, gdb-patches@sourceware.org, ktietz@redhat.com Subject: Re: [patch] compile: Fix MinGW build [Re: [mingw rfc] Add mkdtemp to gdb/gnulib/] References: <87a92pvc0w.fsf@codesourcery.com> <20141215124358.GU5457@adacore.com> <20141215171225.GA19674@host2.jankratochvil.net> <20141215181449.GA5457@adacore.com> <20141215182057.GA22226@host2.jankratochvil.net> <20141215183554.GB5457@adacore.com> <20141215184014.GA22610@host2.jankratochvil.net> <83y4q8wxk7.fsf@gnu.org> <20141215222801.GA28138@host2.jankratochvil.net> <83vblcw9hw.fsf@gnu.org> <20141217191755.GE21574@host2.jankratochvil.net> <83r3vyul89.fsf@gnu.org> <5491E8C4.502@redhat.com> <83y4q4ub3q.fsf@gnu.org> In-Reply-To: <83y4q4ub3q.fsf@gnu.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SW-Source: 2014-12/txt/msg00541.txt.bz2 On 12/18/2014 05:22 PM, Eli Zaretskii wrote: >> Date: Wed, 17 Dec 2014 20:34:12 +0000 >> From: Pedro Alves >> CC: brobecker@adacore.com, yao@codesourcery.com, gdb-patches@sourceware.org, >> ktietz@redhat.com >> >> Note that set_gdbarch_infcall_mmap doesn't need to implement the >> whole feature set of mmap. We only need to be able to carve out a >> piece of memory. Should map trivially to VirtualAlloc. > > That's true, but if this feature will work by doing the equivalent of > dlopen, then it will most probably only ever work on GNU/Linux. Even > there, we cannot really hope to do all this stuff by hand, do it > safely, and then track all the changes in the OS to keep this working > for the years to come. And good luck being able to do it at all on > proprietary systems such as Windows, where you cannot simply examine > the sources of the DLL loader. I don't think we'll need to. In fact, I have a feeling that on Windows things will tend to be simpler, given PE is simpler/more contained than ELF. But if it turns out that whoever tries to make this work on Windows finds out that the LoadLibrary route is better for Windows, then I don't see that as a problem. I'm sure we can fit that in by overriding some hooks. > I conclude that sadly this feature is extremely limited, and will > probably die very soon, unless we change its implementation to > something more portable and safe. We shall see. :-) Thanks, Pedro Alves