From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14688 invoked by alias); 17 Dec 2014 19:37:52 -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 14575 invoked by uid 89); 17 Dec 2014 19:37:51 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.9 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 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; Wed, 17 Dec 2014 19:37:49 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id sBHJbgrx023991 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 17 Dec 2014 14:37:43 -0500 Received: from host2.jankratochvil.net (ovpn-116-142.ams2.redhat.com [10.36.116.142]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id sBHJbboH001443 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Wed, 17 Dec 2014 14:37:40 -0500 Date: Wed, 17 Dec 2014 19:37:00 -0000 From: Jan Kratochvil To: Eli Zaretskii Cc: 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/] Message-ID: <20141217193737.GA23385@host2.jankratochvil.net> References: <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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <83r3vyul89.fsf@gnu.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-IsSubscribed: yes X-SW-Source: 2014-12/txt/msg00499.txt.bz2 On Wed, 17 Dec 2014 20:31:18 +0100, Eli Zaretskii wrote: > Why is dlopen "intrusive"? ISTM that using the Windows equivalent of > dlopen is exactly the right thing here. First I do not want to advocate the mmap() + ld.so reimplementation too much as I would implement it the dlopen() way (at least in the initial implementation) myself. But AFAIK (but I do not know much) MS-Windows implements its dlopen-like feature in MS-Windows kernel which may be safe. Contrary to it GNU/Linux implements dlopen() fully in glibc - userland - calling from kernel only that mmap() to map the .so file from disk, map some new pages of memory etc. By having to modify the _r_debug.r_map link list which is in many times corrupted when debugging crashed program GDB would crash the inferior even more on 'compile code' command. Jan