Prototypes for exception and stacktrace. Declare additional arguments
for exception to be able to print nexted exceptions.
This commit is contained in:
parent
b4f6994278
commit
bc17115a34
@ -4,13 +4,19 @@
|
||||
*/
|
||||
|
||||
#include "../../kernel.h"
|
||||
#include "proto.h"
|
||||
#include <signal.h>
|
||||
#include "../../proc.h"
|
||||
|
||||
/*===========================================================================*
|
||||
* exception *
|
||||
*===========================================================================*/
|
||||
PUBLIC void exception(unsigned vec_nr)
|
||||
PUBLIC void exception(vec_nr, trap_errno, old_eip, old_cs, old_eflags)
|
||||
unsigned vec_nr;
|
||||
u32_t trap_errno;
|
||||
u32_t old_eip;
|
||||
U16_t old_cs;
|
||||
u32_t old_eflags;
|
||||
{
|
||||
/* An exception or unexpected interrupt has occurred. */
|
||||
|
||||
@ -84,6 +90,10 @@ PUBLIC void exception(unsigned vec_nr)
|
||||
kprintf("process %d (%s), ", proc_nr(saved_proc), saved_proc->p_name);
|
||||
kprintf("pc = %u:0x%x", (unsigned) saved_proc->p_reg.cs,
|
||||
(unsigned) saved_proc->p_reg.pc);
|
||||
kprintf(
|
||||
"vec_nr= %d, trap_errno= 0x%lx, eip= 0x%lx, cs= 0x%x, eflags= 0x%lx\n",
|
||||
vec_nr, (unsigned long)trap_errno,
|
||||
(unsigned long)old_eip, old_cs, (unsigned long)old_eflags);
|
||||
|
||||
panic("exception in a kernel task", NO_NUM);
|
||||
}
|
||||
|
@ -44,6 +44,11 @@ _PROTOTYPE( void trp, (void) );
|
||||
_PROTOTYPE( void s_call, (void) ), _PROTOTYPE( p_s_call, (void) );
|
||||
_PROTOTYPE( void level0_call, (void) );
|
||||
|
||||
/* exception.c */
|
||||
_PROTOTYPE( void exception, (unsigned vec_nr, u32_t trap_errno,
|
||||
u32_t old_eip, U16_t old_cs, u32_t old_eflags) );
|
||||
_PROTOTYPE( void stacktrace, (struct proc *proc) );
|
||||
|
||||
/* klib386.s */
|
||||
_PROTOTYPE( void level0, (void (*func)(void)) );
|
||||
_PROTOTYPE( void monitor, (void) );
|
||||
|
Loading…
x
Reference in New Issue
Block a user