Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/trace/trace.c

    r7e752b2 r19f857a  
    161161        if (rc < 0) {
    162162                printf("Error connecting\n");
    163                 printf("ipc_connect_task(%" PRIu64 ") -> %d ", task_id, rc);
     163                printf("ipc_connect_task(%" PRIdTASKID ") -> %d ", task_id, rc);
    164164                return rc;
    165165        }
     
    200200        printf("Threads:");
    201201        for (i = 0; i < n_threads; i++) {
    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));
     202                printf(" [%d] (hash %p)", 1+i, thread_hash_buf[i]);
     203        }
     204        printf("\ntotal of %u threads\n", tb_needed / sizeof(uintptr_t));
    205205
    206206        return 0;
     
    224224        case V_HASH:
    225225        case V_PTR:
    226                 printf("%p", (void *) val);
     226                printf("%p", val);
    227227                break;
    228228
     
    248248        case V_CHAR:
    249249                if (sval >= 0x20 && sval < 0x7f) {
    250                         printf("'%c'", (char) sval);
     250                        printf("'%c'", sval);
    251251                } else {
    252252                        switch (sval) {
     
    257257                        case '\t': printf("'\\t'"); break;
    258258                        case '\\': printf("'\\\\'"); break;
    259                         default: printf("'\\x%02" PRIxn "'", val); break;
     259                        default: printf("'\\x%02lX'", val); break;
    260260                        }
    261261                }
     
    277277
    278278        putchar('(');
    279         if (n > 0) printf("%" PRIun, sc_args[0]);
     279        if (n > 0) printf("%" PRIdSYSARG, sc_args[0]);
    280280        for (i = 1; i < n; i++) {
    281                 printf(", %" PRIun, sc_args[i]);
     281                printf(", %" PRIdSYSARG, sc_args[i]);
    282282        }
    283283        putchar(')');
     
    489489{
    490490        async_serialize_start();
    491         printf("New thread, hash %p\n", (void *) hash);
     491        printf("New thread, hash 0x%lx\n", hash);
    492492        async_serialize_end();
    493493
     
    510510        }
    511511
    512         printf("Start tracing thread [%u] (hash %p).\n",
    513             thread_id, (void *) thread_hash);
     512        printf("Start tracing thread [%d] (hash %p).\n", thread_id, thread_hash);
    514513
    515514        while (!abort_trace) {
     
    517516                fibril_mutex_lock(&state_lock);
    518517                if (paused) {
    519                         printf("Thread [%u] paused. Press R to resume.\n",
     518                        printf("Thread [%d] paused. Press R to resume.\n",
    520519                            thread_id);
    521520
     
    523522                                fibril_condvar_wait(&state_cv, &state_lock);
    524523
    525                         printf("Thread [%u] resumed.\n", thread_id);
     524                        printf("Thread [%d] resumed.\n", thread_id);
    526525                }
    527526                fibril_mutex_unlock(&state_lock);
     
    555554                                break;
    556555                        case UDEBUG_EVENT_THREAD_E:
    557                                 printf("Thread %" PRIun " exited.\n", val0);
     556                                printf("Thread %p exited.\n", val0);
    558557                                fibril_mutex_lock(&state_lock);
    559558                                abort_trace = true;
     
    928927                                }
    929928                        } else {
    930                                 printf("Uknown option '%c'\n", arg[0]);
     929                                printf("Uknown option '%s'\n", arg[0]);
    931930                                print_syntax();
    932931                                return -1;
     
    985984        rc = connect_task(task_id);
    986985        if (rc < 0) {
    987                 printf("Failed connecting to task %" PRIu64 ".\n", task_id);
     986                printf("Failed connecting to task %" PRIdTASKID ".\n", task_id);
    988987                return 1;
    989988        }
    990989
    991         printf("Connected to task %" PRIu64 ".\n", task_id);
     990        printf("Connected to task %" PRIdTASKID ".\n", task_id);
    992991
    993992        if (task_ldr != NULL)
Note: See TracChangeset for help on using the changeset viewer.