[PATCH] Introduce "gdb/configure.nat" (and delete "gdb/config/*/*.mh" files)
John Baldwin
jhb@freebsd.org
Tue Apr 25 21:08:00 GMT 2017
On Tuesday, April 25, 2017 04:23:09 PM Sergio Durigan Junior wrote:
> Due to my ongoing work to make it possible for gdbserver to start the
> inferior using the shell, I had to share the fork_inferior function
> under the "nat/" directory. In order to do that, I created a new file
> and put the function there; however, this meant that I now had to
> update some of the *.mh files (under "gdb/config") and add the new
> file as a dependency to be built natively. Bleh...
>
> After talking a bit to Pedro about this, the idea came up to write a
> new "gdb/configure.nat" file, a la "gdb/configure.tgt", which would
> concentrate all of the native settings for each host/system. I
> decided to tackle this issue.
>
> The patch is simple. All of the previous Makefile variables that were
> being declared inside the *.mh files are now inside "gdb/Makefile.in",
> and "gdb/configure" is responsible for AC_SUBST'ing them. The
> definitions of these variables were put inside "gdb/configure.nat", so
> now they're shell variables. For excerpts of Makefile code, one must
> create a file under "gdb/config/${gdb_cpu_host}" and reference it on
> the "NAT_EXTRA_FRAGS_FILE" variable.
>
> It should now be easier to update the native dependencies of hosts in
> this single file.
>
> This has been tested on x86_64 without regressions.
The FreeBSD-related bits all look correct to me. I do think this is easier
to work with than the various *.mh files.
--
John Baldwin
More information about the Gdb-patches
mailing list