OLD | NEW |
1 /* Python interface to inferior threads. | 1 /* Python interface to inferior threads. |
2 | 2 |
3 Copyright (C) 2009-2012 Free Software Foundation, Inc. | 3 Copyright (C) 2009-2012 Free Software Foundation, Inc. |
4 | 4 |
5 This file is part of GDB. | 5 This file is part of GDB. |
6 | 6 |
7 This program is free software; you can redistribute it and/or modify | 7 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 | 8 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 | 9 the Free Software Foundation; either version 3 of the License, or |
10 (at your option) any later version. | 10 (at your option) any later version. |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 | 155 |
156 return ret; | 156 return ret; |
157 } | 157 } |
158 | 158 |
159 /* Implementation of InferiorThread.switch (). | 159 /* Implementation of InferiorThread.switch (). |
160 Makes this the GDB selected thread. */ | 160 Makes this the GDB selected thread. */ |
161 static PyObject * | 161 static PyObject * |
162 thpy_switch (PyObject *self, PyObject *args) | 162 thpy_switch (PyObject *self, PyObject *args) |
163 { | 163 { |
164 thread_object *thread_obj = (thread_object *) self; | 164 thread_object *thread_obj = (thread_object *) self; |
165 struct cleanup *cleanup; | |
166 volatile struct gdb_exception except; | 165 volatile struct gdb_exception except; |
167 | 166 |
168 THPY_REQUIRE_VALID (thread_obj); | 167 THPY_REQUIRE_VALID (thread_obj); |
169 | 168 |
170 TRY_CATCH (except, RETURN_MASK_ALL) | 169 TRY_CATCH (except, RETURN_MASK_ALL) |
171 { | 170 { |
172 switch_to_thread (thread_obj->thread->ptid); | 171 switch_to_thread (thread_obj->thread->ptid); |
173 } | 172 } |
174 GDB_PY_HANDLE_EXCEPTION (except); | 173 GDB_PY_HANDLE_EXCEPTION (except); |
175 | 174 |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
334 0, /* tp_members */ | 333 0, /* tp_members */ |
335 thread_object_getset, /* tp_getset */ | 334 thread_object_getset, /* tp_getset */ |
336 0, /* tp_base */ | 335 0, /* tp_base */ |
337 0, /* tp_dict */ | 336 0, /* tp_dict */ |
338 0, /* tp_descr_get */ | 337 0, /* tp_descr_get */ |
339 0, /* tp_descr_set */ | 338 0, /* tp_descr_set */ |
340 0, /* tp_dictoffset */ | 339 0, /* tp_dictoffset */ |
341 0, /* tp_init */ | 340 0, /* tp_init */ |
342 0 /* tp_alloc */ | 341 0 /* tp_alloc */ |
343 }; | 342 }; |
OLD | NEW |