target: add debug_reason_name()

Provide and use debug_reason_name() instead of expecting targets
to call Jim_Nvp_value2name_simple().  Less dependency on Jim, and
the code becomes more clear too.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
This commit is contained in:
David Brownell
2009-12-07 14:55:08 -08:00
parent 19ad7f828b
commit bbb754aa39
5 changed files with 19 additions and 8 deletions

View File

@@ -91,8 +91,6 @@ enum target_debug_reason
DBG_REASON_UNDEFINED = 6
};
extern const Jim_Nvp nvp_target_debug_reason[];
enum target_endianess
{
TARGET_ENDIAN_UNKNOWN = 0,
@@ -165,6 +163,8 @@ static inline const char *target_name(struct target *target)
return target->cmd_name;
}
const char *debug_reason_name(struct target *t);
enum target_event
{
/* LD historical names