31#ifndef _RTEMS_DEBUGGER_TARGET_h
32#define _RTEMS_DEBUGGER_TARGET_h
36#include <rtems/rtems-debugger.h>
38#include "rtems-debugger-threads.h"
47#define RTEMS_DEBUGGER_TARGET_SWBREAK_NUM 64
52#define RTEMS_DEBUGGER_TARGET_CAP_SWBREAK (1 << 0)
53#define RTEMS_DEBUGGER_TARGET_CAP_HWBREAK (1 << 1)
54#define RTEMS_DEBUGGER_TARGET_CAP_HWWATCH (1 << 2)
62#define RTEMS_DEBUGGER_TARGET_CAP_PURE_SWBREAK (1 << 3)
67typedef enum rtems_debugger_target_watchpoint
69 rtems_debugger_target_hw_read,
70 rtems_debugger_target_hw_write,
71 rtems_debugger_target_hw_read_write,
72 rtems_debugger_target_hw_execute
73} rtems_debugger_target_watchpoint;
78typedef enum rtems_debugger_target_exc_action
80 rtems_debugger_target_exc_consumed,
81 rtems_debugger_target_exc_cascade,
82 rtems_debugger_target_exc_step,
83} rtems_debugger_target_exc_action;
88#define RTEMS_DEBUGGER_TARGET_SWBREAK_MAX_SIZE (4)
91 uint8_t contents[RTEMS_DEBUGGER_TARGET_SWBREAK_MAX_SIZE];
101typedef int (*rtems_debugger_target_code_writer)(
void* address,
115 const size_t* reg_offset;
116 const uint8_t* breakpoint;
117 size_t breakpoint_size;
119 rtems_debugger_target_code_writer code_writer;
121 jmp_buf access_return;
122 uintptr_t step_bp_address;
130extern int rtems_debugger_target_create(
void);
135extern int rtems_debugger_target_destroy(
void);
145extern int rtems_debugger_target_enable(
void);
150extern int rtems_debugger_target_disable(
void);
155extern uint32_t rtems_debugger_target_capabilities(
void);
160extern size_t rtems_debugger_target_reg_num(
void);
165extern size_t rtems_debugger_target_reg_size(
size_t reg);
170extern size_t rtems_debugger_target_reg_offset(
size_t reg);
175extern size_t rtems_debugger_target_reg_table_size(
void);
225extern int rtems_debugger_target_swbreak_control(
bool insert,
232extern int rtems_debugger_target_swbreak_insert(
void);
237extern int rtems_debugger_target_swbreak_remove(
void);
242extern bool rtems_debugger_target_swbreak_is_configured( uintptr_t addr );
247extern int rtems_debugger_target_hwbreak_insert(
void);
252extern int rtems_debugger_target_hwbreak_remove(
void);
257extern int rtems_debugger_target_hwbreak_control(rtems_debugger_target_watchpoint type,
265extern rtems_debugger_target_exc_action
288extern int rtems_debugger_target_start_memory_access(
void);
293extern void rtems_debugger_target_end_memory_access(
void);
298extern bool rtems_debugger_target_is_memory_access(
void);
Objects_Id rtems_id
This type represents RTEMS object identifiers.
Definition: types.h:94
The set of registers that specifies the complete processor state.
Definition: cpu.h:446
Definition: rtems-debugger-block.h:46
Definition: rtems-debugger-target.h:89
Definition: rtems-debugger-target.h:112
Definition: rtems-debugger-threads.h:87