[PATCH 3/5] aarch64-newlib-tdep patch
Joel Brobecker
brobecker@adacore.com
Sun Jan 13 07:40:00 GMT 2013
> >As mentioned in the review of patch #1, can you explain how this
> >code would be activated, and why you need a new osabi value?
>
> The code is activated by "set osabi Newlib". The code is required
> because we want somewhere to hang setjmp longjmp handling for newlib
> without hardwiring the assumption that all bare-metal environments
> use newlib.
OK, thanks for the explanation. I don't have any experience with
newlib, but I think it would be helpful in the long run if we could
add a newlib sniffer. It might not be obvious, and might in fact
require assistance from the newlib developers.
In the meantime, I think we will need to document somewhere
the fact that a user has to execute this command to switch
to the "newlib" ABI... I'm just not sure where. Ask EliZ?
> 2013-01-07 Jim MacArthur <jim.macarthur@arm.com>
> Marcus Shawcroft <marcus.shawcroft@arm.com>
> Nigel Stephens <nigel.stephens@arm.com>
> Yufeng Zhang <yufeng.zhang@arm.com>
>
> * aarch64-newlib-tdep.c: New file.
> * defs.h (enum gdb_osabi): Add GDB_OSABI_NEWLIB.
> * osabi.c (gdb_osabi_names): Add "Newlib".
Can you add Makefile.in, and configure.tgt?
> diff --git a/gdb/Makefile.in b/gdb/Makefile.in
> index 02fe931..58803e9 100644
> --- a/gdb/Makefile.in
> +++ b/gdb/Makefile.in
> @@ -519,7 +519,7 @@ TARGET_OBS = @TARGET_OBS@
> # All target-dependent objects files that require 64-bit CORE_ADDR
> # (used with --enable-targets=all --enable-64-bit-bfd).
> ALL_64_TARGET_OBS = \
> - aarch64-linux-tdep.o aarch64-tdep.o \
> + aarch64-linux-tdep.o aarch64-newlib-tdep.o aarch64-tdep.o \
Same comment as before - can you add aarch64-newlib-tdep.o after
aarch64-tdep.o (sorry if I appear anal, I just try to maintain
consistency).
> alphabsd-tdep.o alphafbsd-tdep.o alpha-linux-tdep.o alpha-mdebug-tdep.o \
> alphanbsd-tdep.o alphaobsd-tdep.o alpha-osf1-tdep.o alpha-tdep.o \
> amd64fbsd-tdep.o amd64-darwin-tdep.o amd64-dicos-tdep.o \
> @@ -1413,7 +1413,7 @@ force_update:
> MAKEOVERRIDES=
>
> ALLDEPFILES = \
> - aarch64-linux-tdep.c aarch64-tdep.c \
> + aarch64-linux-tdep.c aarch64-newlib-tdep.c aarch64-tdep.c \
Same here...
> +static void
> +aarch64_newlib_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
This function needs a quick documentation ("Implements the ...
callback", for instance).
--
Joel
More information about the Gdb-patches
mailing list