uint64_t param_4;
};
+/** Returns a description of the endianness for the specified target. */
+static inline const char *target_endianness(struct target *target)
+{
+ return (target->endianness == TARGET_ENDIAN_UNKNOWN) ? "unknown" :
+ (target->endianness == TARGET_BIG_ENDIAN) ? "big endian" : "little endian";
+}
+
/** Returns the instance-specific name of the specified target. */
static inline const char *target_name(struct target *target)
{
struct target *get_target_by_num(int num);
struct target *get_current_target(struct command_context *cmd_ctx);
+struct target *get_current_target_or_null(struct command_context *cmd_ctx);
struct target *get_target(const char *id);
/**
int target_hit_watchpoint(struct target *target,
struct watchpoint **watchpoint);
+/**
+ * Obtain the architecture for GDB.
+ *
+ * This routine is a wrapper for target->type->get_gdb_arch.
+ */
+const char *target_get_gdb_arch(struct target *target);
+
/**
* Obtain the registers for GDB.
*
struct reg **reg_list[], int *reg_list_size,
enum target_register_class reg_class);
+/**
+ * Check if @a target allows GDB connections.
+ *
+ * Some target do not implement the necessary code required by GDB.
+ */
+bool target_supports_gdb_connection(struct target *target);
+
/**
* Step the target.
*
#define ERROR_TARGET_TRANSLATION_FAULT (-309)
#define ERROR_TARGET_NOT_RUNNING (-310)
#define ERROR_TARGET_NOT_EXAMINED (-311)
+#define ERROR_TARGET_DUPLICATE_BREAKPOINT (-312)
extern bool get_target_reset_nag(void);