Changeset 0108984a in mainline for kernel/generic/src/udebug/udebug_ops.c
- Timestamp:
- 2008-09-17T13:38:18Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- c9a29d6
- Parents:
- fb9b0b0
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/udebug/udebug_ops.c
rfb9b0b0 r0108984a 36 36 */ 37 37 38 #include < print.h>38 #include <debug.h> 39 39 #include <proc/task.h> 40 40 #include <proc/thread.h> … … 163 163 link_t *cur; 164 164 165 printf("udebug_begin()\n");166 167 mutex_lock(&TASK->udebug.lock); 168 printf("debugging task %llu\n", TASK->taskid);165 LOG("udebug_begin()\n"); 166 167 mutex_lock(&TASK->udebug.lock); 168 LOG("debugging task %llu\n", TASK->taskid); 169 169 170 170 if (TASK->udebug.dt_state != UDEBUG_TS_INACTIVE) { 171 171 mutex_unlock(&TASK->udebug.lock); 172 printf("udebug_begin(): busy error\n");172 LOG("udebug_begin(): busy error\n"); 173 173 174 174 return EBUSY; … … 200 200 mutex_unlock(&TASK->udebug.lock); 201 201 202 printf("udebug_begin() done (%s)\n",202 LOG("udebug_begin() done (%s)\n", 203 203 reply ? "reply" : "stoppability wait"); 204 204 … … 210 210 int rc; 211 211 212 printf("udebug_end()\n");213 214 mutex_lock(&TASK->udebug.lock); 215 printf("task %llu\n", TASK->taskid);212 LOG("udebug_end()\n"); 213 214 mutex_lock(&TASK->udebug.lock); 215 LOG("task %" PRIu64 "\n", TASK->taskid); 216 216 217 217 rc = udebug_task_cleanup(TASK); … … 224 224 int udebug_set_evmask(udebug_evmask_t mask) 225 225 { 226 printf("udebug_set_mask()\n"); 227 228 printf("debugging task %llu\n", TASK->taskid); 226 LOG("udebug_set_mask()\n"); 229 227 230 228 mutex_lock(&TASK->udebug.lock); … … 232 230 if (TASK->udebug.dt_state != UDEBUG_TS_ACTIVE) { 233 231 mutex_unlock(&TASK->udebug.lock); 234 printf("udebug_set_mask(): not active debuging session\n");232 LOG("udebug_set_mask(): not active debuging session\n"); 235 233 236 234 return EINVAL; … … 248 246 { 249 247 int rc; 250 251 // printf("udebug_go()\n");252 248 253 249 /* On success, this will lock t->udebug.lock */ … … 275 271 int rc; 276 272 277 printf("udebug_stop()\n");273 LOG("udebug_stop()\n"); 278 274 mutex_lock(&TASK->udebug.lock); 279 275 … … 299 295 * Answer GO call 300 296 */ 301 printf("udebug_stop - answering go call\n");297 LOG("udebug_stop - answering go call\n"); 302 298 303 299 /* Make sure nobody takes this call away from us */ … … 307 303 IPC_SET_RETVAL(call->data, 0); 308 304 IPC_SET_ARG1(call->data, UDEBUG_EVENT_STOP); 309 printf("udebug_stop/ipc_answer\n");305 LOG("udebug_stop/ipc_answer\n"); 310 306 311 307 THREAD->udebug.cur_event = UDEBUG_EVENT_STOP; … … 316 312 mutex_unlock(&TASK->udebug.lock); 317 313 318 printf("udebog_stop/done\n");314 LOG("udebog_stop/done\n"); 319 315 return 0; 320 316 } … … 331 327 size_t max_ids; 332 328 333 printf("udebug_thread_read()\n");329 LOG("udebug_thread_read()\n"); 334 330 335 331 /* Allocate a buffer to hold thread IDs */ … … 386 382 unative_t *arg_buffer; 387 383 388 // printf("udebug_args_read()\n");389 390 384 /* Prepare a buffer to hold the arguments */ 391 385 arg_buffer = malloc(6 * sizeof(unative_t), 0); … … 428 422 data_buffer = malloc(n, 0); 429 423 430 // printf("udebug_mem_read: src=%u, size=%u\n", uspace_addr, n);431 432 424 /* NOTE: this is not strictly from a syscall... but that shouldn't 433 425 * be a problem */
Note:
See TracChangeset
for help on using the changeset viewer.