aboutsummaryrefslogtreecommitdiff
path: root/gdb/nto-tdep.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/nto-tdep.c')
-rw-r--r--gdb/nto-tdep.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/gdb/nto-tdep.c b/gdb/nto-tdep.c
index 27bd191..8286db2 100644
--- a/gdb/nto-tdep.c
+++ b/gdb/nto-tdep.c
@@ -380,9 +380,13 @@ static const char *nto_thread_state_str[] =
const char *
nto_extra_thread_info (struct target_ops *self, struct thread_info *ti)
{
- if (ti && ti->priv
- && ti->priv->state < ARRAY_SIZE (nto_thread_state_str))
- return (char *)nto_thread_state_str [ti->priv->state];
+ if (ti != NULL && ti->priv != NULL)
+ {
+ nto_thread_info *priv = get_nto_thread_info (ti);
+
+ if (priv->state < ARRAY_SIZE (nto_thread_state_str))
+ return nto_thread_state_str [priv->state];
+ }
return "";
}