diff mbox

[1/6] : Commonise various target-descriptions.c functions

Message ID 5159CC81-6EF1-43DC-9C1D-DF85DC51A59D@arm.com
State New
Headers show

Commit Message

Alan Hayward Jan. 16, 2018, 2:18 p.m. UTC
> 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)


With this, everything builds with and without --enable-targets=all, and all run tests
continue to pass.

Alan.
diff mbox

Patch

--- 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 \