Changes in uspace/lib/c/generic/stacktrace.c [8751cf3:a35b458] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/stacktrace.c
r8751cf3 ra35b458 39 39 #include <stdint.h> 40 40 #include <errno.h> 41 #include <io/kio.h>42 41 43 42 static errno_t stacktrace_read_uintptr(void *arg, uintptr_t addr, uintptr_t *data); 44 43 45 44 static stacktrace_ops_t basic_ops = { 46 .read_uintptr = stacktrace_read_uintptr, 47 .printf = printf, 48 }; 49 50 static stacktrace_ops_t kio_ops = { 51 .read_uintptr = stacktrace_read_uintptr, 52 .printf = kio_printf, 45 .read_uintptr = stacktrace_read_uintptr 53 46 }; 54 47 … … 64 57 65 58 while (stacktrace_fp_valid(&st, fp)) { 66 ops->printf("%p: %p()\n", (void *) fp, (void *) pc);59 printf("%p: %p()\n", (void *) fp, (void *) pc); 67 60 rc = stacktrace_ra_get(&st, fp, &pc); 68 61 if (rc != EOK) … … 78 71 { 79 72 stacktrace_print_generic(&basic_ops, NULL, fp, pc); 80 }81 82 void stacktrace_kio_print(void)83 {84 stacktrace_prepare();85 stacktrace_print_generic(&kio_ops, NULL, stacktrace_fp_get(), stacktrace_pc_get());86 87 /*88 * Prevent the tail call optimization of the previous call by89 * making it a non-tail call.90 */91 92 kio_printf("-- end of stack trace --\n");93 73 } 94 74
Note:
See TracChangeset
for help on using the changeset viewer.