| OLD | NEW |
| 1 /* Multi-thread control defs for remote server for GDB. | 1 /* Multi-thread control defs for remote server for GDB. |
| 2 Copyright (C) 1993, 1995, 1997-2000, 2002-2012 Free Software | 2 Copyright (C) 1993-2013 Free Software Foundation, Inc. |
| 3 Foundation, Inc. | |
| 4 | 3 |
| 5 This file is part of GDB. | 4 This file is part of GDB. |
| 6 | 5 |
| 7 This program is free software; you can redistribute it and/or modify | 6 This program is free software; you can redistribute it and/or modify |
| 8 it under the terms of the GNU General Public License as published by | 7 it under the terms of the GNU General Public License as published by |
| 9 the Free Software Foundation; either version 3 of the License, or | 8 the Free Software Foundation; either version 3 of the License, or |
| 10 (at your option) any later version. | 9 (at your option) any later version. |
| 11 | 10 |
| 12 This program is distributed in the hope that it will be useful, | 11 This program is distributed in the hope that it will be useful, |
| 13 but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 15 GNU General Public License for more details. | 14 GNU General Public License for more details. |
| 16 | 15 |
| 17 You should have received a copy of the GNU General Public License | 16 You should have received a copy of the GNU General Public License |
| 18 along with this program. If not, see <http://www.gnu.org/licenses/>. */ | 17 along with this program. If not, see <http://www.gnu.org/licenses/>. */ |
| 19 | 18 |
| 20 #ifndef GDB_THREAD_H | 19 #ifndef GDB_THREAD_H |
| 21 #define GDB_THREAD_H | 20 #define GDB_THREAD_H |
| 22 | 21 |
| 23 #include "server.h" | 22 #include "server.h" |
| 23 #include "inferiors.h" |
| 24 |
| 25 struct btrace_target_info; |
| 24 | 26 |
| 25 struct thread_info | 27 struct thread_info |
| 26 { | 28 { |
| 27 struct inferior_list_entry entry; | 29 struct inferior_list_entry entry; |
| 28 void *target_data; | 30 void *target_data; |
| 29 void *regcache_data; | 31 void *regcache_data; |
| 30 | 32 |
| 31 /* The last resume GDB requested on this thread. */ | 33 /* The last resume GDB requested on this thread. */ |
| 32 enum resume_kind last_resume_kind; | 34 enum resume_kind last_resume_kind; |
| 33 | 35 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 51 | 53 |
| 52 On the other hand, the same tracepoint with a while-stepping action | 54 On the other hand, the same tracepoint with a while-stepping action |
| 53 may be hit by more than one thread simultaneously, hence we can't | 55 may be hit by more than one thread simultaneously, hence we can't |
| 54 keep the current step count in the tracepoint itself. | 56 keep the current step count in the tracepoint itself. |
| 55 | 57 |
| 56 This is the head of the list of the states of `while-stepping' | 58 This is the head of the list of the states of `while-stepping' |
| 57 tracepoint actions this thread is now collecting; NULL if empty. | 59 tracepoint actions this thread is now collecting; NULL if empty. |
| 58 Each item in the list holds the current step of the while-stepping | 60 Each item in the list holds the current step of the while-stepping |
| 59 action. */ | 61 action. */ |
| 60 struct wstep_state *while_stepping; | 62 struct wstep_state *while_stepping; |
| 63 |
| 64 /* Branch trace target information for this thread. */ |
| 65 struct btrace_target_info *btrace; |
| 61 }; | 66 }; |
| 62 | 67 |
| 63 extern struct inferior_list all_threads; | 68 extern struct inferior_list all_threads; |
| 64 | 69 |
| 65 void remove_thread (struct thread_info *thread); | 70 void remove_thread (struct thread_info *thread); |
| 66 void add_thread (ptid_t ptid, void *target_data); | 71 void add_thread (ptid_t ptid, void *target_data); |
| 67 | 72 |
| 68 struct thread_info *find_thread_ptid (ptid_t ptid); | 73 struct thread_info *find_thread_ptid (ptid_t ptid); |
| 69 struct thread_info *gdb_id_to_thread (unsigned int); | 74 struct thread_info *gdb_id_to_thread (unsigned int); |
| 70 | 75 |
| 76 /* Get current thread ID (Linux task ID). */ |
| 77 #define current_ptid ((struct inferior_list_entry *) current_inferior)->id |
| 71 #endif /* GDB_THREAD_H */ | 78 #endif /* GDB_THREAD_H */ |
| OLD | NEW |