Changeset 7e752b2 in mainline for uspace/app/taskdump/taskdump.c


Ignore:
Timestamp:
2010-11-26T01:33:20Z (14 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
bf61d3a
Parents:
202f57b
Message:
  • correct printf() formatting strings and corresponding arguments
  • minor cstyle changes and other small fixes
File:
1 edited

Legend:

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

    r202f57b r7e752b2  
    8585        rc = connect_task(task_id);
    8686        if (rc < 0) {
    87                 printf("Failed connecting to task %" PRIdTASKID ".\n", task_id);
     87                printf("Failed connecting to task %" PRIu64 ".\n", task_id);
    8888                return 1;
    8989        }
     
    9292        app_symtab = NULL;
    9393
    94         printf("Dumping task '%s' (task ID %" PRIdTASKID ").\n", app_name, task_id);
     94        printf("Dumping task '%s' (task ID %" PRIu64 ").\n", app_name, task_id);
    9595        autoload_syms();
    9696        putchar('\n');
     
    126126        if (rc < 0) {
    127127                printf("Error connecting\n");
    128                 printf("ipc_connect_task(%" PRIdTASKID ") -> %d ", task_id, rc);
     128                printf("ipc_connect_task(%" PRIu64 ") -> %d ", task_id, rc);
    129129                return rc;
    130130        }
     
    168168                                core_file_name = *argv;
    169169                        } else {
    170                                 printf("Uknown option '%s'\n", arg[0]);
     170                                printf("Uknown option '%c'\n", arg[0]);
    171171                                print_syntax();
    172172                                return -1;
     
    240240        printf("Threads:\n");
    241241        for (i = 0; i < n_threads; i++) {
    242                 printf(" [%d] hash: %p\n", 1+i, thash_buf[i]);
     242                printf(" [%zu] hash: %p\n", 1 + i, (void *) thash_buf[i]);
    243243
    244244                thread_dump(thash_buf[i]);
     
    284284        printf("Address space areas:\n");
    285285        for (i = 0; i < n_areas; i++) {
    286                 printf(" [%d] flags: %c%c%c%c base: %p size: %p\n", 1+i,
     286                printf(" [%zu] flags: %c%c%c%c base: %p size: %zu\n", 1 + i,
    287287                    (ainfo_buf[i].flags & AS_AREA_READ) ? 'R' : '-',
    288288                    (ainfo_buf[i].flags & AS_AREA_WRITE) ? 'W' : '-',
    289289                    (ainfo_buf[i].flags & AS_AREA_EXEC) ? 'X' : '-',
    290290                    (ainfo_buf[i].flags & AS_AREA_CACHEABLE) ? 'C' : '-',
    291                     ainfo_buf[i].start_addr, ainfo_buf[i].size);
     291                    (void *) ainfo_buf[i].start_addr, ainfo_buf[i].size);
    292292        }
    293293
     
    326326
    327327        sym_pc = fmt_sym_address(pc);
    328         printf("Thread %p crashed at %s. FP = %p\n", thash, sym_pc, fp);
     328        printf("Thread %p crashed at %s. FP = %p\n", (void *) thash,
     329            sym_pc, (void *) fp);
    329330        free(sym_pc);
    330331
     
    334335        while (stacktrace_fp_valid(&st, fp)) {
    335336                sym_pc = fmt_sym_address(pc);
    336                 printf("  %p: %s\n", fp, sym_pc);
     337                printf("  %p: %s\n", (void *) fp, sym_pc);
    337338                free(sym_pc);
    338339
     
    457458
    458459        if (rc == EOK) {
    459                 rc = asprintf(&str, "%p (%s+%p)", addr, name, offs);
     460                rc = asprintf(&str, "%p (%s+%zu)", (void *) addr, name, offs);
    460461        } else {
    461                 rc = asprintf(&str, "%p", addr);
     462                rc = asprintf(&str, "%p", (void *) addr);
    462463        }
    463464
Note: See TracChangeset for help on using the changeset viewer.