1. Move thread_state to gdbthread.h because record target need get the
status of each thread. Sometime, GDB will not remove the thread entry
when it exit.
2. record_is_waiting is to flag that mean this thread is still
running. I will introduce in next mail.
2009-11-25 Hui Zhu <email@example.com>
gdbthread.h (thread_state): New enum.
(thread_info): Add record_is_waiting.
thread.c (thread_state): Deleted.
gdbthread.h | 11 +++++++++++
thread.c | 9 ---------
2 files changed, 11 insertions(+), 9 deletions(-)
@@ -29,6 +29,15 @@ struct symtab;
+/* Frontend view of the thread state. Possible extensions: stepping,
+ finishing, until(ling),... */
struct thread_info *next;
@@ -37,6 +46,8 @@ struct thread_info
kernel thread id, etc. */
int num; /* Convenient handle (GDB thread id) */
+ int record_is_waiting;
/* Non-zero means the thread is executing. Note: this is different
from saying that there is an active target and we are stopped at
a breakpoint, for instance. This is a real indicator whether the
@@ -63,15 +63,6 @@ static void thread_apply_command (char *
static void restore_current_thread (ptid_t);
static void prune_threads (void);
-/* Frontend view of the thread state. Possible extensions: stepping,
- finishing, until(ling),... */