Changeset 80487bc5 in mainline for uspace/app/taskdump/taskdump.c
- Timestamp:
- 2010-01-25T21:40:13Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- e515b21a
- Parents:
- 0d21b53
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/taskdump/taskdump.c
r0d21b53 r80487bc5 41 41 #include <task.h> 42 42 #include <kernel/mm/as.h> 43 #include <libarch/istate.h> 43 44 #include <macros.h> 44 45 #include <assert.h> … … 58 59 static void print_syntax(); 59 60 static int threads_dump(void); 61 static int thread_dump(uintptr_t thash); 60 62 static int areas_dump(void); 61 63 static int area_dump(as_area_info_t *area); … … 229 231 for (i = 0; i < n_threads; i++) { 230 232 printf(" [%d] hash: 0x%lx\n", 1+i, thash_buf[i]); 233 234 thread_dump(thash_buf[i]); 231 235 } 232 236 putchar('\n'); … … 291 295 } 292 296 297 static int thread_dump(uintptr_t thash) 298 { 299 istate_t istate; 300 uintptr_t pc, fp; 301 int rc; 302 303 rc = udebug_regs_read(phoneid, thash, &istate); 304 if (rc < 0) { 305 printf("Failed reading registers (%d).\n", rc); 306 return EIO; 307 } 308 309 pc = istate_get_pc(&istate); 310 fp = istate_get_fp(&istate); 311 312 printf("Thread 0x%lx crashed at PC 0x%lx. FP 0x%lx\n", thash, pc, fp); 313 printf("Istate hexdump:\n"); 314 hex_dump(0, &istate, (sizeof(istate_t) + 15) & ~15); 315 316 return EOK; 317 } 318 293 319 static int area_dump(as_area_info_t *area) 294 320 {
Note:
See TracChangeset
for help on using the changeset viewer.