• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

GNU Binutils with patches for OS216


Commit MetaInfo

Revisióne6e53b4014d4974d749e1afad3b3216ef5a1caf0 (tree)
Tiempo2011-04-20 00:28:52
AutorMarc Khouzam <marc.khouzam@eric...>
CommiterMarc Khouzam

Log Message

2011-04-19 Marc Khouzam <marc.khouzam@ericsson.com>

* thread.c (any_live_thread_of_process): Prioritize threads
that are not executing.
* gdbthread.h (any_live_thread_of_process): Update comment
as per above change.

Cambiar Resumen

Diferencia incremental

--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,10 @@
1+2011-04-19 Marc Khouzam <marc.khouzam@ericsson.com>
2+
3+ * thread.c (any_live_thread_of_process): Prioritize threads
4+ that are not executing.
5+ * gdbthread.h (any_live_thread_of_process): Update comment
6+ as per above change.
7+
18 2011-03-18 Kwok Cheung Yeung <kcy@codesourcery.com>
29
310 * MAINTAINERS: Add myself as a write-after-approval maintainer.
--- a/gdb/gdbthread.h
+++ b/gdb/gdbthread.h
@@ -251,7 +251,7 @@ struct thread_info *first_thread_of_process (int pid);
251251 extern struct thread_info *any_thread_of_process (int pid);
252252
253253 /* Returns any non-exited thread of process PID, giving preference for
254- already stopped threads. */
254+ not executing threads. */
255255 extern struct thread_info *any_live_thread_of_process (int pid);
256256
257257 /* Change the ptid of thread OLD_PTID to NEW_PTID. */
--- a/gdb/thread.c
+++ b/gdb/thread.c
@@ -448,18 +448,18 @@ struct thread_info *
448448 any_live_thread_of_process (int pid)
449449 {
450450 struct thread_info *tp;
451- struct thread_info *tp_running = NULL;
451+ struct thread_info *tp_executing = NULL;
452452
453453 for (tp = thread_list; tp; tp = tp->next)
454- if (ptid_get_pid (tp->ptid) == pid)
454+ if (tp->state_ != THREAD_EXITED && ptid_get_pid (tp->ptid) == pid)
455455 {
456- if (tp->state_ == THREAD_STOPPED)
456+ if (tp->executing_)
457+ tp_executing = tp;
458+ else
457459 return tp;
458- else if (tp->state_ == THREAD_RUNNING)
459- tp_running = tp;
460460 }
461461
462- return tp_running;
462+ return tp_executing;
463463 }
464464
465465 /* Print a list of thread ids currently known, and the total number of