- int (*read_core_reg)(struct target_s *target, int num);
- int (*write_core_reg)(struct target_s *target, int num);
-
- arm_jtag_t jtag_info;
-
- int (*examine_debug_reason)(target_t *target);
- void (*pre_debug_entry)(target_t *target);
- void (*post_debug_entry)(target_t *target);
-
- void (*pre_restore_context)(target_t *target);
- void (*post_restore_context)(target_t *target);
-
- void *arch_info;
-} armv7m_common_t;
-
-typedef struct armv7m_algorithm_s
+ int (*read_core_reg)(struct target *target, unsigned num);
+ int (*write_core_reg)(struct target *target, unsigned num);
+
+ int (*examine_debug_reason)(struct target *target);
+ void (*post_debug_entry)(struct target *target);
+
+ void (*pre_restore_context)(struct target *target);
+ void (*post_restore_context)(struct target *target);
+};
+
+static inline struct armv7m_common *
+target_to_armv7m(struct target *target)
+{
+ return target->arch_info;
+}
+
+struct armv7m_algorithm