aboutsummaryrefslogtreecommitdiff
path: root/gdb/osabi.c
diff options
context:
space:
mode:
authorJerome Guitton <guitton@adacore.com>2018-11-01 14:32:30 -0700
committerJoel Brobecker <brobecker@adacore.com>2018-11-01 14:43:44 -0700
commite1c3a3737536c57e43d4ad693341717e326f4e17 (patch)
tree1fe742d3db7938be4c6de702d2c2b4c4b5b71922 /gdb/osabi.c
parente8d8cce69b34481a27562267d94a1aff19b05518 (diff)
downloadbinutils-e1c3a3737536c57e43d4ad693341717e326f4e17.zip
binutils-e1c3a3737536c57e43d4ad693341717e326f4e17.tar.gz
binutils-e1c3a3737536c57e43d4ad693341717e326f4e17.tar.bz2
arm-pikeos: software single step
On ARM, PikeOS does not support hardware single step, causing various semi-random errors when trying to next/step over some user code. So this patch changes this target to use software-single-step instead. The challenge is that, up to now, the PikeOS target was in all respects identical to a baremetal target as far as GDB was concerned, meaning we were using the baremetal osabi for this target too. This is no longer possible, and we need to introduce a new OSABI variant. Unfortunately, there isn't anything in the object file that would allow us to differentiate between the two platforms. So we have to rely on a heuristic instead, where we look for some known symbols that are required in a PikeOS application (these symbols are expected to be defined by the default linker script, and correspond to routines used to allocate the application stack). For the long run, the hope is that the stub implementation provided by PikeOS is enhanced so that it includes vContSupported+ to the $qSupported query, and then that the reply to the "vCont?" query only return support for "continue" operations (thus exclusing "step" operations). We could then use that information to reliably determine at connection time that the target does not support single-stepping and therefore automatically turn software single-stepping automatically based on it. gdb/ChangeLog: * defs.h (enum gdb_osabi): Add GDB_OSABI_PIKEOS. * osabi.c (gdb_osabi_names): Add name for GDB_OSABI_PIKEOS. * arm-pikeos-tdep.c: New file. * configure.tgt: Add arm-pikeos-tdep.o to the case of ARM embedded system. * Makefile.in (ALL_TARGET_OBS): Add arm-pikeos-tdep.o. Tested on arm-pikeos and arm-elf using AdaCore's testsuite. We also evaluated it on armhf-linux as a cross platform.
Diffstat (limited to 'gdb/osabi.c')
-rw-r--r--gdb/osabi.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/gdb/osabi.c b/gdb/osabi.c
index 7d0540b..68f4665 100644
--- a/gdb/osabi.c
+++ b/gdb/osabi.c
@@ -80,6 +80,7 @@ static const struct osabi_names gdb_osabi_names[] =
{ "LynxOS178", NULL },
{ "Newlib", NULL },
{ "SDE", NULL },
+ { "PikeOS", NULL },
{ "<invalid>", NULL }
};