This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] compile: Fix MinGW build [Re: [mingw rfc] Add mkdtemp to gdb/gnulib/]
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: Eli Zaretskii <eliz at gnu dot org>
- Cc: brobecker at adacore dot com, yao at codesourcery dot com, gdb-patches at sourceware dot org, ktietz at redhat dot com
- Date: Wed, 17 Dec 2014 20:37:37 +0100
- Subject: Re: [patch] compile: Fix MinGW build [Re: [mingw rfc] Add mkdtemp to gdb/gnulib/]
- Authentication-results: sourceware.org; auth=none
- References: <20141215171225 dot GA19674 at host2 dot jankratochvil dot net> <20141215181449 dot GA5457 at adacore dot com> <20141215182057 dot GA22226 at host2 dot jankratochvil dot net> <20141215183554 dot GB5457 at adacore dot com> <20141215184014 dot GA22610 at host2 dot jankratochvil dot net> <83y4q8wxk7 dot fsf at gnu dot org> <20141215222801 dot GA28138 at host2 dot jankratochvil dot net> <83vblcw9hw dot fsf at gnu dot org> <20141217191755 dot GE21574 at host2 dot jankratochvil dot net> <83r3vyul89 dot fsf at gnu dot org>
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