|
20 | 20 | #define OPENOCD_RTOS_RTOS_H |
21 | 21 |
|
22 | 22 | #include "server/server.h" |
| 23 | +#include "target/breakpoints.h" |
23 | 24 | #include "target/target.h" |
24 | 25 | #include <helper/jim-nvp.h> |
25 | 26 |
|
@@ -103,6 +104,12 @@ struct rtos_type { |
103 | 104 | uint8_t *buffer); |
104 | 105 | int (*write_buffer)(struct rtos *rtos, target_addr_t address, uint32_t size, |
105 | 106 | const uint8_t *buffer); |
| 107 | + /* When a software breakpoint is set, it is set on only one target, |
| 108 | + * because we assume memory is shared across them. By default this is the |
| 109 | + * first target in the SMP group. Override this function to have |
| 110 | + * breakpoint_add() use a different target. */ |
| 111 | + struct target * (*swbp_target)(struct rtos *rtos, target_addr_t address, |
| 112 | + uint32_t length, enum breakpoint_type type); |
106 | 113 | }; |
107 | 114 |
|
108 | 115 | struct stack_register_offset { |
@@ -166,5 +173,7 @@ int rtos_read_buffer(struct target *target, target_addr_t address, |
166 | 173 | uint32_t size, uint8_t *buffer); |
167 | 174 | int rtos_write_buffer(struct target *target, target_addr_t address, |
168 | 175 | uint32_t size, const uint8_t *buffer); |
| 176 | +struct target *rtos_swbp_target(struct target *target, target_addr_t address, |
| 177 | + uint32_t length, enum breakpoint_type type); |
169 | 178 |
|
170 | 179 | #endif /* OPENOCD_RTOS_RTOS_H */ |
0 commit comments