Changeset 8af9950 in mainline
- Timestamp:
- 2008-12-07T18:36:51Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 925fdd7
- Parents:
- 5d9430d7
- Location:
- kernel/generic
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/include/udebug/udebug.h
r5d9430d7 r8af9950 178 178 /** What type of event are we stopped in or 0 if none. */ 179 179 udebug_event_t cur_event; 180 bool go; 181 bool stoppable; 182 bool debug_active;/**< thread is in a debugging session */180 bool go; /**< thread is GO */ 181 bool stoppable; /**< thread is stoppable */ 182 bool active; /**< thread is in a debugging session */ 183 183 } udebug_thread_t; 184 184 -
kernel/generic/src/udebug/udebug.c
r5d9430d7 r8af9950 73 73 ut->go = false; 74 74 ut->stoppable = true; 75 ut-> debug_active = false;75 ut->active = false; 76 76 ut->cur_event = 0; /* none */ 77 77 } … … 113 113 114 114 mutex_lock(&THREAD->udebug.lock); 115 res = THREAD->udebug. debug_active;115 res = THREAD->udebug.active; 116 116 mutex_unlock(&THREAD->udebug.lock); 117 117 … … 171 171 */ 172 172 173 if (THREAD->udebug. debug_active == true &&173 if (THREAD->udebug.active == true && 174 174 THREAD->udebug.go == false) { 175 175 /* … … 211 211 mutex_lock(&THREAD->udebug.lock); 212 212 213 if (THREAD->udebug.debug_active && 214 THREAD->udebug.go == false) { 213 if (THREAD->udebug.active && THREAD->udebug.go == false) { 215 214 TASK->udebug.begin_call = NULL; 216 215 mutex_unlock(&THREAD->udebug.lock); … … 265 264 266 265 /* Must only generate events when in debugging session and is go. */ 267 if (THREAD->udebug.debug_active != true || 268 THREAD->udebug.go == false || 266 if (THREAD->udebug.active != true || THREAD->udebug.go == false || 269 267 (TASK->udebug.evmask & UDEBUG_EVMASK(etype)) == 0) { 270 268 mutex_unlock(&THREAD->udebug.lock); … … 335 333 336 334 /* Must only generate events when in debugging session */ 337 if (THREAD->udebug. debug_active != true) {338 LOG("- debug_active: %s, udebug.go: %s\n",339 THREAD->udebug. debug_active ? "yes(+)" : "no(-)",335 if (THREAD->udebug.active != true) { 336 LOG("- udebug.active: %s, udebug.go: %s\n", 337 THREAD->udebug.active ? "yes(+)" : "no(-)", 340 338 THREAD->udebug.go ? "yes(-)" : "no(+)"); 341 339 mutex_unlock(&THREAD->udebug.lock); … … 385 383 386 384 /* Must only generate events when in debugging session. */ 387 if (THREAD->udebug. debug_active != true) {388 /* printf("- debug_active: %s, udebug.go: %s\n",389 THREAD->udebug. debug_active ? "yes(+)" : "no(-)",385 if (THREAD->udebug.active != true) { 386 /* printf("- udebug.active: %s, udebug.go: %s\n", 387 THREAD->udebug.active ? "yes(+)" : "no(-)", 390 388 THREAD->udebug.go ? "yes(-)" : "no(+)");*/ 391 389 mutex_unlock(&THREAD->udebug.lock); … … 402 400 403 401 /* Prevent any further debug activity in thread. */ 404 THREAD->udebug. debug_active = false;402 THREAD->udebug.active = false; 405 403 THREAD->udebug.cur_event = 0; /* none */ 406 404 THREAD->udebug.go = false; /* set to initial value */ … … 460 458 if ((flags & THREAD_FLAG_USPACE) != 0) { 461 459 /* Prevent any further debug activity in thread. */ 462 t->udebug. debug_active = false;460 t->udebug.active = false; 463 461 t->udebug.cur_event = 0; /* none */ 464 462 … … 466 464 if (t->udebug.go == true) { 467 465 /* 468 * Yes, so clear go. As debug_active == false,466 * Yes, so clear go. As active == false, 469 467 * this doesn't affect anything. 470 468 */ -
kernel/generic/src/udebug/udebug_ops.c
r5d9430d7 r8af9950 59 59 * and belongs to the current task (TASK). Verifies, that the thread 60 60 * is (or is not) go according to being_go (typically false). 61 * It also locks t->udebug.lock, making sure that t->udebug. debug_active61 * It also locks t->udebug.lock, making sure that t->udebug.active 62 62 * is true - that the thread is in a valid debugging session. 63 63 * … … 109 109 110 110 /* Verify debugging state. */ 111 if (t->udebug. debug_active != true) {111 if (t->udebug.active != true) { 112 112 /* Not in debugging session or undesired GO state */ 113 113 spinlock_unlock(&t->lock); … … 118 118 119 119 /* 120 * Since the thread has debug_active == true, TASK->udebug.lock121 * is enough to ensure its existence and that debug_active remains120 * Since the thread has active == true, TASK->udebug.lock 121 * is enough to ensure its existence and that active remains 122 122 * true. 123 123 */ … … 205 205 } 206 206 207 /* Set udebug. debug_active on all of the task's userspace threads. */207 /* Set udebug.active on all of the task's userspace threads. */ 208 208 209 209 for (cur = TASK->th_head.next; cur != &TASK->th_head; cur = cur->next) { … … 212 212 mutex_lock(&t->udebug.lock); 213 213 if ((t->flags & THREAD_FLAG_USPACE) != 0) 214 t->udebug. debug_active = true;214 t->udebug.active = true; 215 215 mutex_unlock(&t->udebug.lock); 216 216 }
Note:
See TracChangeset
for help on using the changeset viewer.