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

Eli Zaretskii eliz@gnu.org
Thu Dec 18 17:22:00 GMT 2014


> Date: Wed, 17 Dec 2014 20:34:12 +0000
> From: Pedro Alves <palves@redhat.com>
> 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 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.



More information about the Gdb-patches mailing list