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: Eli Zaretskii <eliz at gnu dot org>
- To: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- 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 21:31:18 +0200
- Subject: Re: [patch] compile: Fix MinGW build [Re: [mingw rfc] Add mkdtemp to gdb/gnulib/]
- Authentication-results: sourceware.org; auth=none
- References: <87a92pvc0w dot fsf at codesourcery dot com> <20141215124358 dot GU5457 at adacore dot com> <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>
- Reply-to: Eli Zaretskii <eliz at gnu dot org>
> Date: Wed, 17 Dec 2014 20:17:55 +0100
> From: Jan Kratochvil <jan.kratochvil@redhat.com>
> Cc: brobecker@adacore.com, yao@codesourcery.com, gdb-patches@sourceware.org,
> ktietz@redhat.com
>
> > > linux-tdep.c:
> > > set_gdbarch_infcall_mmap (gdbarch, linux_infcall_mmap);
> >
> > Why is mmap needed here?
>
> The project obviously needs something like:
> (gdb) call dlopen("just compile piece of code.so");
>
> But as dlopen() is intrusive to the inferior Tom decided it is better to do
> much less intrusive
> (gdb) print mmap(...)
>
> instead and reimplement what inferior dlopen() does
> in gdb/compile/compile-object-load.c - which is being done.
Why is dlopen "intrusive"? ISTM that using the Windows equivalent of
dlopen is exactly the right thing here.