From d574e08663ee57a15802fdc5f0c8f8a5b09bd528 Mon Sep 17 00:00:00 2001 From: Chris Johns Date: Mon, 17 Oct 2022 16:25:57 +1100 Subject: libdebugger: Add a target break call to suspend all running threads - Optionally wait if there is no remote debugger connected and break when the remote connects Closes #4740 --- cpukit/include/rtems/debugger/rtems-debugger-server.h | 1 + cpukit/include/rtems/rtems-debugger.h | 8 ++++++++ 2 files changed, 9 insertions(+) (limited to 'cpukit/include/rtems') diff --git a/cpukit/include/rtems/debugger/rtems-debugger-server.h b/cpukit/include/rtems/debugger/rtems-debugger-server.h index 2189aac873..4d0407a951 100644 --- a/cpukit/include/rtems/debugger/rtems-debugger-server.h +++ b/cpukit/include/rtems/debugger/rtems-debugger-server.h @@ -103,6 +103,7 @@ extern "C" { #define RTEMS_DEBUGGER_FLAG_MULTIPROCESS (1 << 4) #define RTEMS_DEBUGGER_FLAG_VERBOSE_LOCK (1 << 5) #define RTEMS_DEBUGGER_FLAG_VERBOSE_CMDS (1 << 6) +#define RTEMS_DEBUGGER_FLAG_BREAK_WAITER (1 << 7) /** * Forward decl for the threads and targets. diff --git a/cpukit/include/rtems/rtems-debugger.h b/cpukit/include/rtems/rtems-debugger.h index 1fc8b3d522..7627e83382 100644 --- a/cpukit/include/rtems/rtems-debugger.h +++ b/cpukit/include/rtems/rtems-debugger.h @@ -53,6 +53,14 @@ extern int rtems_debugger_start(const char* remote, rtems_task_priority priority, const rtems_printer* printer); +/** + * Suspend all running threads including the caller if not + * excluded. Returns when the debugger has connected and continued. + * + * If wait is true and there is no remote connected wait then break. + */ +extern int rtems_debugger_break(bool wait); + /** * Stop the Debugger. */ -- cgit v1.2.3