aboutsummaryrefslogtreecommitdiff
path: root/gdb/defs.h
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/defs.h
parente8d8cce69b34481a27562267d94a1aff19b05518 (diff)
downloadfsf-binutils-gdb-e1c3a3737536c57e43d4ad693341717e326f4e17.zip
fsf-binutils-gdb-e1c3a3737536c57e43d4ad693341717e326f4e17.tar.gz
fsf-binutils-gdb-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/defs.h')
-rw-r--r--gdb/defs.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/gdb/defs.h b/gdb/defs.h
index 6e3f4df..9e87971 100644
--- a/gdb/defs.h
+++ b/gdb/defs.h
@@ -498,6 +498,7 @@ enum gdb_osabi
GDB_OSABI_LYNXOS178,
GDB_OSABI_NEWLIB,
GDB_OSABI_SDE,
+ GDB_OSABI_PIKEOS,
GDB_OSABI_INVALID /* keep this last */
};