mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-08-06 14:49:38 +08:00
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.
This commit is contained in:

committed by
Joel Brobecker

parent
e8d8cce69b
commit
e1c3a37375
@ -180,6 +180,7 @@ arm*-*-symbianelf*)
|
||||
;;
|
||||
arm*-*-*)
|
||||
# Target: ARM embedded system
|
||||
gdb_target_obs="arm-pikeos-tdep.o"
|
||||
gdb_sim=../sim/arm/libsim.a
|
||||
;;
|
||||
|
||||
|
Reference in New Issue
Block a user