arm_opcode: fix encoding of ARMv5 breakpoint instruction
[fw/openocd] / src / rtos / eCos.c
index edc3d8b51014d0630ae8c5c71b335b9ad65e0f4e..e6b70730b5d40533b749305bdd4b97e6ecf533c2 100644 (file)
 #include "helper/types.h"
 #include "rtos_ecos_stackings.h"
 
-static int eCos_detect_rtos(struct target *target);
+static bool eCos_detect_rtos(struct target *target);
 static int eCos_create(struct target *target);
 static int eCos_update_threads(struct rtos *rtos);
-static int eCos_get_thread_reg_list(struct rtos *rtos, int64_t thread_id, char **hex_reg_list);
+static int eCos_get_thread_reg_list(struct rtos *rtos, int64_t thread_id, struct rtos_reg **reg_list, int *num_regs);
 static int eCos_get_symbol_list_to_lookup(symbol_table_elem_t *symbol_list[]);
 
 struct eCos_thread_state {
@@ -285,13 +285,12 @@ static int eCos_update_threads(struct rtos *rtos)
        return 0;
 }
 
-static int eCos_get_thread_reg_list(struct rtos *rtos, int64_t thread_id, char **hex_reg_list)
+static int eCos_get_thread_reg_list(struct rtos *rtos, int64_t thread_id,
+               struct rtos_reg **reg_list, int *num_regs)
 {
        int retval;
        const struct eCos_params *param;
 
-       *hex_reg_list = NULL;
-
        if (rtos == NULL)
                return -1;
 
@@ -345,7 +344,8 @@ static int eCos_get_thread_reg_list(struct rtos *rtos, int64_t thread_id, char *
                return rtos_generic_stack_read(rtos->target,
                        param->stacking_info,
                        stack_ptr,
-                       hex_reg_list);
+                       reg_list,
+                       num_regs);
        }
 
        return -1;
@@ -363,14 +363,14 @@ static int eCos_get_symbol_list_to_lookup(symbol_table_elem_t *symbol_list[])
        return 0;
 }
 
-static int eCos_detect_rtos(struct target *target)
+static bool eCos_detect_rtos(struct target *target)
 {
        if ((target->rtos->symbols != NULL) &&
                        (target->rtos->symbols[eCos_VAL_thread_list].address != 0)) {
                /* looks like eCos */
-               return 1;
+               return true;
        }
-       return 0;
+       return false;
 }
 
 static int eCos_create(struct target *target)