summaryrefslogtreecommitdiffstats
path: root/cpukit/libdebugger/rtems-debugger-target.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--cpukit/libdebugger/rtems-debugger-target.h31
1 files changed, 22 insertions, 9 deletions
diff --git a/cpukit/libdebugger/rtems-debugger-target.h b/cpukit/libdebugger/rtems-debugger-target.h
index f2abbe5fd3..3f6ceac80b 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.
@@ -164,22 +172,22 @@ extern int rtems_debugger_target_write_regs(rtems_debugger_thread* thread);
/**
* Return the thread's program counter (PC).
*/
-extern DB_UINT rtems_debugger_target_reg_pc(rtems_debugger_thread* thread);
+extern uintptr_t rtems_debugger_target_reg_pc(rtems_debugger_thread* thread);
/**
* Return the frame's program counter (PC).
*/
-extern DB_UINT rtems_debugger_target_frame_pc(CPU_Exception_frame* frame);
+extern uintptr_t rtems_debugger_target_frame_pc(CPU_Exception_frame* frame);
/**
* Return the thread's stack pointer (SP).
*/
-extern DB_UINT rtems_debugger_target_reg_sp(rtems_debugger_thread* thread);
+extern uintptr_t rtems_debugger_target_reg_sp(rtems_debugger_thread* thread);
/**
* Return the thread's TCB stack pointer (SP).
*/
-extern DB_UINT rtems_debugger_target_tcb_sp(rtems_debugger_thread* thread);
+extern uintptr_t rtems_debugger_target_tcb_sp(rtems_debugger_thread* thread);
/**
* The thread is stepping. Setup the thread to step an instruction.
@@ -200,7 +208,7 @@ extern void rtems_debugger_target_exception_print(CPU_Exception_frame* frame);
* Software breakpoints. These are also referred to as memory breakpoints.
*/
extern int rtems_debugger_target_swbreak_control(bool insert,
- DB_UINT addr,
+ uintptr_t addr,
DB_UINT kind);
/**
@@ -214,6 +222,11 @@ extern int rtems_debugger_target_swbreak_insert(void);
extern int rtems_debugger_target_swbreak_remove(void);
/**
+ * Determine whether a software breakpoint is configured for the given address.
+ */
+extern bool rtems_debugger_target_swbreak_is_configured( uintptr_t addr );
+
+/**
* Insert hardware breakpoints into the hardware.
*/
extern int rtems_debugger_target_hwbreak_insert(void);
@@ -228,7 +241,7 @@ extern int rtems_debugger_target_hwbreak_remove(void);
*/
extern int rtems_debugger_target_hwbreak_control(rtems_debugger_target_watchpoint type,
bool insert,
- DB_UINT addr,
+ uintptr_t addr,
DB_UINT kind);
/**