This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 1/6] : Commonise various target-descriptions.c functions
- From: Alan Hayward <Alan dot Hayward at arm dot com>
- To: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Cc: nd <nd at arm dot com>
- Date: Tue, 16 Jan 2018 14:18:07 +0000
- Subject: Re: [PATCH 1/6] : Commonise various target-descriptions.c functions
- Authentication-results: sourceware.org; auth=none
- Authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alan dot Hayward at arm dot com;
- Nodisclaimer: True
- References: <EAA396DF-9E34-45B9-A3B1-EC7FB294ADDE@arm.com> <CFD4D062-238A-456A-97B1-892FF8D32DF1@arm.com>
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
> On 16 Jan 2018, at 09:50, Alan Hayward <Alan.Hayward@arm.com> wrote:
>
> This patch simply moves functionality from target-descriptions.c
> to the common files arch/tdesc.c and arch/tdesc.h.
> No functionality is changed.
> This will allow usage by gdbserver.
> The "#ifndef GDBSERVER" around the functions in arch/tdesc.h will be removed
> in the next patch.
>
> diff --git a/gdb/Makefile.in b/gdb/Makefile.in
> index 0a4a06b242e0423218648fe77d53fc192456cd2f..386ab5c117ebf34e1ae927b5fe78fd4618012945 100644
> --- a/gdb/Makefile.in
> +++ b/gdb/Makefile.in
> @@ -669,6 +669,7 @@ ALL_TARGET_OBS = \
> arch/arm-get-next-pcs.o \
> arch/arm-linux.o \
> arch/i386.o \
> + arch/tdesc.o \
> arm-bsd-tdep.o \
> arm-fbsd-tdep.o \
> arm-linux-tdep.o \
>
Apologies, just spotted a slight bug. If you build with don’t build with
--enable-targets=all then you’ll get a link error with gdb.
The Makefile.in diff needs changing to the following (instead of the change above)
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -913,6 +912,7 @@ COMMON_SFILES = \
agent.c \
annotate.c \
arch-utils.c \
+ arch/tdesc.c \
auto-load.c \
auxv.c \
ax-gdb.c \
With this, everything builds with and without --enable-targets=all, and all run tests
continue to pass.
Alan.