arm-pikeos: software single step
authorJerome Guitton <guitton@adacore.com>
Thu, 1 Nov 2018 21:32:30 +0000 (14:32 -0700)
committerJoel Brobecker <brobecker@adacore.com>
Thu, 1 Nov 2018 21:43:44 +0000 (14:43 -0700)
commite1c3a3737536c57e43d4ad693341717e326f4e17
tree1fe742d3db7938be4c6de702d2c2b4c4b5b71922
parente8d8cce69b34481a27562267d94a1aff19b05518
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.
gdb/ChangeLog
gdb/Makefile.in
gdb/arm-pikeos-tdep.c [new file with mode: 0644]
gdb/configure.tgt
gdb/defs.h
gdb/osabi.c
This page took 0.04774 seconds and 4 git commands to generate.