Changes in uspace/app/taskdump/taskdump.c [6a343bdf:e3a3a619] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/taskdump/taskdump.c
r6a343bdf re3a3a619 33 33 */ 34 34 35 #include <async.h>36 35 #include <stdio.h> 37 36 #include <stdlib.h> 38 37 #include <unistd.h> 38 #include <ipc/ipc.h> 39 39 #include <errno.h> 40 40 #include <udebug.h> … … 85 85 rc = connect_task(task_id); 86 86 if (rc < 0) { 87 printf("Failed connecting to task %" PRI u64".\n", task_id);87 printf("Failed connecting to task %" PRIdTASKID ".\n", task_id); 88 88 return 1; 89 89 } … … 92 92 app_symtab = NULL; 93 93 94 printf("Dumping task '%s' (task ID %" PRI u64").\n", app_name, task_id);94 printf("Dumping task '%s' (task ID %" PRIdTASKID ").\n", app_name, task_id); 95 95 autoload_syms(); 96 96 putchar('\n'); … … 105 105 106 106 udebug_end(phoneid); 107 async_hangup(phoneid);107 ipc_hangup(phoneid); 108 108 109 109 return 0; … … 114 114 int rc; 115 115 116 rc = async_connect_kbox(task_id);116 rc = ipc_connect_kbox(task_id); 117 117 118 118 if (rc == ENOTSUP) { … … 126 126 if (rc < 0) { 127 127 printf("Error connecting\n"); 128 printf(" async_connect_kbox(%" PRIu64") -> %d ", task_id, rc);128 printf("ipc_connect_task(%" PRIdTASKID ") -> %d ", task_id, rc); 129 129 return rc; 130 130 } … … 168 168 core_file_name = *argv; 169 169 } else { 170 printf("Uknown option '% c'\n", arg[0]);170 printf("Uknown option '%s'\n", arg[0]); 171 171 print_syntax(); 172 172 return -1; … … 240 240 printf("Threads:\n"); 241 241 for (i = 0; i < n_threads; i++) { 242 printf(" [% zu] hash: %p\n", 1 + i, (void *)thash_buf[i]);242 printf(" [%d] hash: %p\n", 1+i, thash_buf[i]); 243 243 244 244 thread_dump(thash_buf[i]); … … 284 284 printf("Address space areas:\n"); 285 285 for (i = 0; i < n_areas; i++) { 286 printf(" [% zu] flags: %c%c%c%c base: %p size: %zu\n", 1 +i,286 printf(" [%d] flags: %c%c%c%c base: %p size: %p\n", 1+i, 287 287 (ainfo_buf[i].flags & AS_AREA_READ) ? 'R' : '-', 288 288 (ainfo_buf[i].flags & AS_AREA_WRITE) ? 'W' : '-', 289 289 (ainfo_buf[i].flags & AS_AREA_EXEC) ? 'X' : '-', 290 290 (ainfo_buf[i].flags & AS_AREA_CACHEABLE) ? 'C' : '-', 291 (void *)ainfo_buf[i].start_addr, ainfo_buf[i].size);291 ainfo_buf[i].start_addr, ainfo_buf[i].size); 292 292 } 293 293 … … 326 326 327 327 sym_pc = fmt_sym_address(pc); 328 printf("Thread %p: PC = %s. FP = %p\n", (void *) thash, 329 sym_pc, (void *) fp); 328 printf("Thread %p crashed at %s. FP = %p\n", thash, sym_pc, fp); 330 329 free(sym_pc); 331 330 … … 335 334 while (stacktrace_fp_valid(&st, fp)) { 336 335 sym_pc = fmt_sym_address(pc); 337 printf(" %p: %s\n", (void *)fp, sym_pc);336 printf(" %p: %s\n", fp, sym_pc); 338 337 free(sym_pc); 339 338 … … 394 393 395 394 rc = asprintf(&file_name, "/srv/%s", app_name); 396 if (rc < 0) {397 printf("Memory allocation failure.\n");398 exit(1);399 }400 401 rc = symtab_load(file_name, &app_symtab);402 if (rc == EOK) {403 printf("Loaded symbol table from %s\n", file_name);404 free(file_name);405 return;406 }407 408 rc = asprintf(&file_name, "/drv/%s/%s", app_name, app_name);409 395 if (rc < 0) { 410 396 printf("Memory allocation failure.\n"); … … 471 457 472 458 if (rc == EOK) { 473 rc = asprintf(&str, "%p (%s+% zu)", (void *)addr, name, offs);459 rc = asprintf(&str, "%p (%s+%p)", addr, name, offs); 474 460 } else { 475 rc = asprintf(&str, "%p", (void *)addr);461 rc = asprintf(&str, "%p", addr); 476 462 } 477 463
Note:
See TracChangeset
for help on using the changeset viewer.