summaryrefslogtreecommitdiff
path: root/src/target/target.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/target/target.h')
-rw-r--r--src/target/target.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/target/target.h b/src/target/target.h
index 3d9d8e9f..91dd1b15 100644
--- a/src/target/target.h
+++ b/src/target/target.h
@@ -107,6 +107,10 @@ typedef struct working_area_s
typedef struct target_type_s
{
+ /**
+ * Name of the target. Do @b not access this field directly, use
+ * target_get_name() instead.
+ */
char *name;
/**
@@ -395,6 +399,13 @@ extern target_t* get_current_target(struct command_context_s *cmd_ctx);
extern int get_num_by_target(target_t *query_target);
extern target_t *get_target(const char *id);
+/**
+ * Get the target name.
+ *
+ * This routine is a wrapper for the target->type->name field.
+ */
+extern const char *target_get_name(struct target_s *target);
+
/// @returns @c true if the target has been examined.
extern bool target_was_examined(struct target_s *target);
/// Sets the @c examined flag for the given target.