Changeset ae5aa90 in mainline for kernel/generic/src/udebug
- Timestamp:
- 2009-05-14T21:29:00Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 9ba6262
- Parents:
- 8ebc8bf4
- Location:
- kernel/generic/src/udebug
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/udebug/udebug.c
r8ebc8bf4 rae5aa90 272 272 } 273 273 274 / /printf("udebug_syscall_event\n");274 /* Fill in the GO response. */ 275 275 call = THREAD->udebug.go_call; 276 276 THREAD->udebug.go_call = NULL; … … 280 280 IPC_SET_ARG2(call->data, id); 281 281 IPC_SET_ARG3(call->data, rc); 282 //printf("udebug_syscall_event/ipc_answer\n");283 282 284 283 THREAD->udebug.syscall_args[0] = a1; … … 330 329 thread_attach(t, ta); 331 330 332 LOG("udebug_thread_b_event\n"); 333 LOG("- check state\n"); 331 LOG("Check state"); 334 332 335 333 /* Must only generate events when in debugging session */ 336 334 if (THREAD->udebug.active != true) { 337 LOG(" - udebug.active: %s, udebug.go: %s\n",338 THREAD->udebug.active ? " yes(+)" : "no(-)",339 THREAD->udebug.go ? " yes(-)" : "no(+)");335 LOG("udebug.active: %s, udebug.go: %s", 336 THREAD->udebug.active ? "Yes(+)" : "No", 337 THREAD->udebug.go ? "Yes(-)" : "No"); 340 338 mutex_unlock(&THREAD->udebug.lock); 341 339 mutex_unlock(&TASK->udebug.lock); … … 343 341 } 344 342 345 LOG("- trigger event\n"); 346 343 LOG("Trigger event"); 347 344 call = THREAD->udebug.go_call; 348 345 THREAD->udebug.go_call = NULL; … … 364 361 mutex_unlock(&TASK->udebug.lock); 365 362 366 LOG(" - sleep\n");363 LOG("Wait for Go"); 367 364 udebug_wait_for_go(&THREAD->udebug.go_wq); 368 365 } … … 380 377 mutex_lock(&THREAD->udebug.lock); 381 378 382 LOG("udebug_thread_e_event\n"); 383 LOG("- check state\n"); 379 LOG("Check state"); 384 380 385 381 /* Must only generate events when in debugging session. */ 386 382 if (THREAD->udebug.active != true) { 387 /* printf("- udebug.active: %s, udebug.go: %s\n",388 THREAD->udebug.active ? " yes(+)" : "no(-)",389 THREAD->udebug.go ? " yes(-)" : "no(+)");*/383 LOG("udebug.active: %s, udebug.go: %s", 384 THREAD->udebug.active ? "Yes" : "No", 385 THREAD->udebug.go ? "Yes" : "No"); 390 386 mutex_unlock(&THREAD->udebug.lock); 391 387 mutex_unlock(&TASK->udebug.lock); … … 393 389 } 394 390 395 LOG("- trigger event\n"); 396 391 LOG("Trigger event"); 397 392 call = THREAD->udebug.go_call; 398 393 THREAD->udebug.go_call = NULL; … … 433 428 ipl_t ipl; 434 429 435 LOG("udebug_task_cleanup()\n");436 LOG("task %" PRIu64 "\n", ta->taskid);437 438 430 if (ta->udebug.dt_state != UDEBUG_TS_BEGINNING && 439 431 ta->udebug.dt_state != UDEBUG_TS_ACTIVE) { 440 LOG("udebug_task_cleanup(): task not being debugged\n");441 432 return EINVAL; 442 433 } 434 435 LOG("Task %" PRIu64, ta->taskid); 443 436 444 437 /* Finish debugging of all userspace threads */ … … 471 464 472 465 /* Answer GO call */ 473 LOG(" answer GO call with EVENT_FINISHED\n");466 LOG("Answer GO call with EVENT_FINISHED."); 474 467 IPC_SET_RETVAL(t->udebug.go_call->data, 0); 475 468 IPC_SET_ARG1(t->udebug.go_call->data, -
kernel/generic/src/udebug/udebug_ops.c
r8ebc8bf4 rae5aa90 182 182 link_t *cur; 183 183 184 LOG("udebug_begin()\n"); 185 186 mutex_lock(&TASK->udebug.lock); 187 LOG("debugging task %llu\n", TASK->taskid); 184 LOG("Debugging task %llu", TASK->taskid); 185 mutex_lock(&TASK->udebug.lock); 188 186 189 187 if (TASK->udebug.dt_state != UDEBUG_TS_INACTIVE) { 190 188 mutex_unlock(&TASK->udebug.lock); 191 LOG("udebug_begin(): busy error\n");192 193 189 return EBUSY; 194 190 } … … 218 214 219 215 mutex_unlock(&TASK->udebug.lock); 220 221 LOG("udebug_begin() done (%s)\n",222 reply ? "reply" : "stoppability wait");223 224 216 return reply; 225 217 } … … 234 226 int rc; 235 227 236 LOG("udebug_end()\n"); 237 238 mutex_lock(&TASK->udebug.lock); 239 LOG("task %" PRIu64 "\n", TASK->taskid); 240 228 LOG("Task %" PRIu64, TASK->taskid); 229 230 mutex_lock(&TASK->udebug.lock); 241 231 rc = udebug_task_cleanup(TASK); 242 243 232 mutex_unlock(&TASK->udebug.lock); 244 233 … … 255 244 int udebug_set_evmask(udebug_evmask_t mask) 256 245 { 257 LOG(" udebug_set_mask()\n");246 LOG("mask = 0x%x", mask); 258 247 259 248 mutex_lock(&TASK->udebug.lock); … … 261 250 if (TASK->udebug.dt_state != UDEBUG_TS_ACTIVE) { 262 251 mutex_unlock(&TASK->udebug.lock); 263 LOG("udebug_set_mask(): not active debuging session\n");264 265 252 return EINVAL; 266 253 } 267 254 268 255 TASK->udebug.evmask = mask; 269 270 256 mutex_unlock(&TASK->udebug.lock); 271 257 … … 318 304 int rc; 319 305 320 LOG("udebug_stop() \n");306 LOG("udebug_stop()"); 321 307 322 308 /* … … 341 327 * Answer GO call. 342 328 */ 343 LOG("udebug_stop - answering go call\n");344 329 345 330 /* Make sure nobody takes this call away from us. */ … … 349 334 IPC_SET_RETVAL(call->data, 0); 350 335 IPC_SET_ARG1(call->data, UDEBUG_EVENT_STOP); 351 LOG("udebug_stop/ipc_answer\n");352 336 353 337 THREAD->udebug.cur_event = UDEBUG_EVENT_STOP; … … 359 343 mutex_unlock(&TASK->udebug.lock); 360 344 361 LOG("udebog_stop/done\n");362 345 return 0; 363 346 } … … 393 376 size_t max_ids; 394 377 395 LOG("udebug_thread_read() \n");378 LOG("udebug_thread_read()"); 396 379 397 380 /* Allocate a buffer to hold thread IDs */
Note:
See TracChangeset
for help on using the changeset viewer.