X-Git-Url: https://review.openocd.org/gitweb?a=blobdiff_plain;f=src%2Frtos%2Frtos.h;h=70c1193e54840c460afd1c520a7aaea7e2492d66;hb=e6fe4dddb97835a60cc512fea977550d7ae4056f;hp=a81f67e216bd4d3deacd1f8126cca8c0ce31128c;hpb=9b2577742cc49683ab0ea8506d93e3e285b53bbd;p=openocd.git diff --git a/src/rtos/rtos.h b/src/rtos/rtos.h index a81f67e216..70c1193e54 100644 --- a/src/rtos/rtos.h +++ b/src/rtos/rtos.h @@ -13,13 +13,11 @@ * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * - * along with this program; if not, write to the * - * Free Software Foundation, Inc., * - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * + * along with this program. If not, see . * ***************************************************************************/ -#ifndef RTOS_H -#define RTOS_H +#ifndef OPENOCD_RTOS_RTOS_H +#define OPENOCD_RTOS_RTOS_H #include "server/server.h" #include @@ -33,15 +31,14 @@ struct reg; * Table should be terminated by an element with NULL in symbol_name */ typedef struct symbol_table_elem_struct { - char *symbol_name; + const char *symbol_name; symbol_address_t address; - + bool optional; } symbol_table_elem_t; struct thread_detail { threadid_t threadid; bool exists; - char *display_str; char *thread_name_str; char *extra_info_str; }; @@ -61,7 +58,7 @@ struct rtos { }; struct rtos_type { - char *name; + const char *name; int (*detect_rtos)(struct target *target); int (*create)(struct target *target); int (*smp_init)(struct target *target); @@ -83,7 +80,15 @@ struct rtos_register_stacking { unsigned char stack_registers_size; signed char stack_growth_direction; unsigned char num_output_registers; - unsigned char stack_alignment; + /* Some targets require evaluating the stack to determine the + * actual stack pointer for a process. If this field is NULL, + * just use stacking->stack_registers_size * stack_growth_direction + * to calculate adjustment. + */ + int64_t (*calculate_process_stack)(struct target *target, + const uint8_t *stack_data, + const struct rtos_register_stacking *stacking, + int64_t stack_ptr); const struct stack_register_offset *register_offsets; }; @@ -103,4 +108,4 @@ int rtos_smp_init(struct target *target); /* function for handling symbol access */ int rtos_qsymbol(struct connection *connection, char const *packet, int packet_size); -#endif /* RTOS_H */ +#endif /* OPENOCD_RTOS_RTOS_H */