diff options
author | Michael Snyder <msnyder@vmware.com> | 2010-05-17 01:15:20 +0000 |
---|---|---|
committer | Michael Snyder <msnyder@vmware.com> | 2010-05-17 01:15:20 +0000 |
commit | 5d5021647dbce1a933576243b9d54281a88eb3b5 (patch) | |
tree | 9cc50cfe6d9329223b5830db2770152391c17b19 /gdb/thread.c | |
parent | 3a6f1766e1c8ec54e2baa00f51d375c554ee63b3 (diff) | |
download | gdb-5d5021647dbce1a933576243b9d54281a88eb3b5.zip gdb-5d5021647dbce1a933576243b9d54281a88eb3b5.tar.gz gdb-5d5021647dbce1a933576243b9d54281a88eb3b5.tar.bz2 |
2010-05-16 Michael Snyder <msnyder@vmware.com>
* target.c: White space.
* target-descriptions.c: White space.
* target-memory.c: White space.
* thread.c: White space.
* top.c: White space.
* tracepoint.c: White space.
* trad-frame.c: White space.
* tramp-frame.c: White space.
* ui-file.c: White space.
* ui-out.c: White space.
* user-regs.c: White space.
* utils.c: White space.
Diffstat (limited to 'gdb/thread.c')
-rw-r--r-- | gdb/thread.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gdb/thread.c b/gdb/thread.c index 16a207c..c10d23c 100644 --- a/gdb/thread.c +++ b/gdb/thread.c @@ -397,6 +397,7 @@ ptid_t thread_id_to_pid (int num) { struct thread_info *thread = find_thread_id (num); + if (thread) return thread->ptid; else @@ -560,6 +561,7 @@ set_running (ptid_t ptid, int running) if (all || ptid_is_pid (ptid)) { int any_started = 0; + for (tp = thread_list; tp; tp = tp->next) if (all || ptid_get_pid (tp->ptid) == ptid_get_pid (ptid)) { @@ -575,6 +577,7 @@ set_running (ptid_t ptid, int running) else { int started = 0; + tp = find_thread_ptid (ptid); gdb_assert (tp); gdb_assert (tp->state_ != THREAD_EXITED); @@ -814,6 +817,7 @@ print_thread_info (struct ui_out *uiout, int requested_thread, int pid) if (ui_out_is_mi_like_p (uiout)) { char *state = "stopped"; + if (tp->state_ == THREAD_RUNNING) state = "running"; ui_out_field_string (uiout, "state", state); @@ -1005,6 +1009,7 @@ restore_current_thread_cleanup_dtor (void *arg) { struct current_thread_cleanup *old = arg; struct thread_info *tp; + tp = find_thread_ptid (old->inferior_ptid); if (tp) tp->refcount--; |