Changeset ba519f7 in mainline for uspace/app/trace/trace.c
- Timestamp:
- 2010-12-02T17:21:30Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 3bd76491
- Parents:
- 8ad673a (diff), 41a7f62 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/trace/trace.c
r8ad673a rba519f7 161 161 if (rc < 0) { 162 162 printf("Error connecting\n"); 163 printf("ipc_connect_task(%" PRI dTASKID") -> %d ", task_id, rc);163 printf("ipc_connect_task(%" PRIu64 ") -> %d ", task_id, rc); 164 164 return rc; 165 165 } … … 200 200 printf("Threads:"); 201 201 for (i = 0; i < n_threads; i++) { 202 printf(" [%d] (hash %p)", 1 +i,thread_hash_buf[i]);203 } 204 printf("\ntotal of % u threads\n", tb_needed / sizeof(uintptr_t));202 printf(" [%d] (hash %p)", 1 + i, (void *) thread_hash_buf[i]); 203 } 204 printf("\ntotal of %zu threads\n", tb_needed / sizeof(uintptr_t)); 205 205 206 206 return 0; … … 224 224 case V_HASH: 225 225 case V_PTR: 226 printf("%p", val);226 printf("%p", (void *) val); 227 227 break; 228 228 … … 248 248 case V_CHAR: 249 249 if (sval >= 0x20 && sval < 0x7f) { 250 printf("'%c'", sval);250 printf("'%c'", (char) sval); 251 251 } else { 252 252 switch (sval) { … … 257 257 case '\t': printf("'\\t'"); break; 258 258 case '\\': printf("'\\\\'"); break; 259 default: printf("'\\x%02 lX'", val); break;259 default: printf("'\\x%02" PRIxn "'", val); break; 260 260 } 261 261 } … … 277 277 278 278 putchar('('); 279 if (n > 0) printf("%" PRI dSYSARG, sc_args[0]);279 if (n > 0) printf("%" PRIun, sc_args[0]); 280 280 for (i = 1; i < n; i++) { 281 printf(", %" PRI dSYSARG, sc_args[i]);281 printf(", %" PRIun, sc_args[i]); 282 282 } 283 283 putchar(')'); … … 489 489 { 490 490 async_serialize_start(); 491 printf("New thread, hash 0x%lx\n",hash);491 printf("New thread, hash %p\n", (void *) hash); 492 492 async_serialize_end(); 493 493 … … 510 510 } 511 511 512 printf("Start tracing thread [%d] (hash %p).\n", thread_id, thread_hash); 512 printf("Start tracing thread [%u] (hash %p).\n", 513 thread_id, (void *) thread_hash); 513 514 514 515 while (!abort_trace) { … … 516 517 fibril_mutex_lock(&state_lock); 517 518 if (paused) { 518 printf("Thread [% d] paused. Press R to resume.\n",519 printf("Thread [%u] paused. Press R to resume.\n", 519 520 thread_id); 520 521 … … 522 523 fibril_condvar_wait(&state_cv, &state_lock); 523 524 524 printf("Thread [% d] resumed.\n", thread_id);525 printf("Thread [%u] resumed.\n", thread_id); 525 526 } 526 527 fibril_mutex_unlock(&state_lock); … … 554 555 break; 555 556 case UDEBUG_EVENT_THREAD_E: 556 printf("Thread % pexited.\n", val0);557 printf("Thread %" PRIun " exited.\n", val0); 557 558 fibril_mutex_lock(&state_lock); 558 559 abort_trace = true; … … 927 928 } 928 929 } else { 929 printf("Uknown option '% s'\n", arg[0]);930 printf("Uknown option '%c'\n", arg[0]); 930 931 print_syntax(); 931 932 return -1; … … 984 985 rc = connect_task(task_id); 985 986 if (rc < 0) { 986 printf("Failed connecting to task %" PRI dTASKID".\n", task_id);987 printf("Failed connecting to task %" PRIu64 ".\n", task_id); 987 988 return 1; 988 989 } 989 990 990 printf("Connected to task %" PRI dTASKID".\n", task_id);991 printf("Connected to task %" PRIu64 ".\n", task_id); 991 992 992 993 if (task_ldr != NULL)
Note:
See TracChangeset
for help on using the changeset viewer.