From ea1a4fd29b5acc36136db80475d7cf26a052e490 Mon Sep 17 00:00:00 2001 From: Kinsey Moore Date: Thu, 10 Feb 2022 10:03:01 -0600 Subject: cpukit/libdebugger: Add pure swbreak capability Add a capability that allows for implementations that operate purely using software breaks. Due to this implementation method, software breaks must not be restored until just before returning control to the thread itself and will be handled by the implementation through thread switch and interrupt hooks. --- cpukit/libdebugger/rtems-debugger-target.h | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'cpukit/libdebugger/rtems-debugger-target.h') diff --git a/cpukit/libdebugger/rtems-debugger-target.h b/cpukit/libdebugger/rtems-debugger-target.h index 1e132fb28c..7836f93bd6 100644 --- a/cpukit/libdebugger/rtems-debugger-target.h +++ b/cpukit/libdebugger/rtems-debugger-target.h @@ -49,9 +49,17 @@ extern "C" { /** * Target capabilities mask. */ -#define RTEMS_DEBUGGER_TARGET_CAP_SWBREAK (1 << 0) -#define RTEMS_DEBUGGER_TARGET_CAP_HWBREAK (1 << 1) -#define RTEMS_DEBUGGER_TARGET_CAP_HWWATCH (1 << 2) +#define RTEMS_DEBUGGER_TARGET_CAP_SWBREAK (1 << 0) +#define RTEMS_DEBUGGER_TARGET_CAP_HWBREAK (1 << 1) +#define RTEMS_DEBUGGER_TARGET_CAP_HWWATCH (1 << 2) +/* + * This target capability indicates that the target implementation uses a pure + * software break implementation which must not allow breakpoints to be + * inserted before the actual switch to the thread, be it in interrupt context + * or otherwise. Such implementations must necessarily implement a thread + * switch hook and interrupt hooks to handle these situations. + */ +#define RTEMS_DEBUGGER_TARGET_CAP_PURE_SWBREAK (1 << 3) /** * Types of hardware breakpoints. -- cgit v1.2.3