Changeset 371bd7d in mainline for kernel/generic/src/interrupt/interrupt.c
- Timestamp:
- 2010-03-27T09:22:17Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/fix-logger-deadlock, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 36a75a2
- Parents:
- cd82bb1 (diff), eaf22d4 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)links above to see all the changes relative to each parent. - File:
-
- 1 edited
-
kernel/generic/src/interrupt/interrupt.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/interrupt/interrupt.c
rcd82bb1 r371bd7d 44 44 #include <console/console.h> 45 45 #include <console/cmd.h> 46 #include <ipc/event.h> 47 #include <synch/mutex.h> 48 #include <time/delay.h> 49 #include <macros.h> 46 50 #include <panic.h> 47 51 #include <print.h> … … 109 113 } 110 114 115 /** Terminate thread and task if exception came from userspace. */ 116 void fault_if_from_uspace(istate_t *istate, const char *fmt, ...) 117 { 118 task_t *task = TASK; 119 va_list args; 120 121 if (!istate_from_uspace(istate)) 122 return; 123 124 printf("Task %s (%" PRIu64 ") killed due to an exception at " 125 "program counter %p.\n", task->name, task->taskid, 126 istate_get_pc(istate)); 127 128 stack_trace_istate(istate); 129 130 printf("Kill message: "); 131 va_start(args, fmt); 132 vprintf(fmt, args); 133 va_end(args); 134 printf("\n"); 135 136 /* 137 * Userspace can subscribe for FAULT events to take action 138 * whenever a thread faults. (E.g. take a dump, run a debugger). 139 * The notification is always available, but unless Udebug is enabled, 140 * that's all you get. 141 */ 142 if (event_is_subscribed(EVENT_FAULT)) { 143 /* Notify the subscriber that a fault occurred. */ 144 event_notify_3(EVENT_FAULT, LOWER32(TASK->taskid), 145 UPPER32(TASK->taskid), (unative_t) THREAD); 146 147 #ifdef CONFIG_UDEBUG 148 /* Wait for a debugging session. */ 149 udebug_thread_fault(); 150 #endif 151 } 152 153 task_kill(task->taskid); 154 thread_exit(); 155 } 156 111 157 #ifdef CONFIG_KCONSOLE 112 158 … … 116 162 #if (IVT_ITEMS > 0) 117 163 unsigned int i; 118 char *symbol;119 164 120 165 spinlock_lock(&exctbl_lock); … … 131 176 132 177 for (i = 0; i < IVT_ITEMS; i++) { 133 symbol = symtab_fmt_name_lookup((unative_t) exc_table[i].f);178 const char *symbol = symtab_fmt_name_lookup((unative_t) exc_table[i].f); 134 179 135 180 #ifdef __32_BITS__
Note:
See TracChangeset
for help on using the changeset viewer.
