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.
This commit is contained in:
Kinsey Moore
2022-02-10 10:03:01 -06:00
committed by Joel Sherrill
parent 924993a4bc
commit ea1a4fd29b
2 changed files with 14 additions and 4 deletions

View File

@@ -355,9 +355,11 @@ rtems_debugger_thread_system_resume(bool detaching)
current = rtems_debugger_thread_current(threads);
if (current != NULL) {
size_t i;
rtems_debugger_target* target = rtems_debugger->target;
if (rtems_debugger_verbose())
rtems_debugger_printf("rtems-db: sys: : resuming\n");
if (!detaching) {
if (!detaching
&& (target->capabilities & RTEMS_DEBUGGER_TARGET_CAP_PURE_SWBREAK) == 0) {
r = rtems_debugger_target_swbreak_insert();
if (r == 0)
r = rtems_debugger_target_hwbreak_insert();