Re: [patch] compile: Fix MinGW build [Re: [mingw rfc] Add mkdtemp to gdb/gnulib/]

Jan Kratochvil
2014-12-17T19:18:06Z

On Tue, 16 Dec 2014 04:37:15 +0100, Eli Zaretskii wrote:
> > default_infcall_mmap:
> > error (_("This target does not support inferior memory allocation by mmap."));
> >
> > As currently there is only:
> >
> > 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.

Without mmap() there is nowhere to load the compiled code at.

Jan