diff options
Diffstat (limited to 'gdb/thread.c')
-rw-r--r-- | gdb/thread.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/gdb/thread.c b/gdb/thread.c index 8a7d142bab..c43f661314 100644 --- a/gdb/thread.c +++ b/gdb/thread.c @@ -2050,6 +2050,26 @@ thread_name (thread_info *thread) return target_thread_name (thread); } +/* See gdbthread.h. */ + +const char * +thread_state_string (enum thread_state state) +{ + switch (state) + { + case THREAD_STOPPED: + return "STOPPED"; + + case THREAD_RUNNING: + return "RUNNING"; + + case THREAD_EXITED: + return "EXITED"; + } + + gdb_assert_not_reached ("unknown thread state"); +} + /* Return a new value for the selected thread's id. Return a value of 0 if no thread is selected. If GLOBAL is true, return the thread's global number. Otherwise return the per-inferior number. */ |