Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 3430 → Rev 3431

/branches/tracing/kernel/arch/arm32/src/mm/page_fault.c
193,6 → 193,8
}
}
 
#ifdef CONFIG_UDEBUG
 
/** Check whether the abort was caused by a bkpt instruction.
*
* This must be called after (possibly) fetching the faulting page.
208,8 → 210,10
 
if ((opcode & 0xfff000f0) == 0xe1200070) {
/* Bkpt */
 
if (istate_from_uspace(istate)) {
udebug_breakpoint_event(0);
return;
} else {
panic("Unexpected BKPT instruction at 0x%x",
istate->pc);
217,6 → 221,8
}
}
 
#endif
 
/** Handles "prefetch abort" exception (instruction couldn't be executed).
*
* @param exc_no Exception number.
233,8 → 239,13
istate->pc);
}
 
#ifdef CONFIG_UDEBUG
/* Now check if the abort was caused by a breakpoint instruction */
bkpt_check(istate);
#else
panic("Unexpected BKPT instruction at 0x%x", istate->pc);
#endif
 
}
 
/** @}
/branches/tracing/kernel/arch/ppc32/src/interrupt.c
96,6 → 96,8
start_decrementer();
}
 
#ifdef CONFIG_UDEBUG
 
static void exception_program_trap(istate_t *istate)
{
if (istate_from_uspace(istate))
114,6 → 116,8
}
}
 
#endif
 
/* Initialize basic tables for exception dispatching */
void interrupt_init(void)
{
121,7 → 125,9
exc_register(VECTOR_INSTRUCTION_STORAGE, "instruction_storage", pht_refill);
exc_register(VECTOR_EXTERNAL, "external", exception_external);
exc_register(VECTOR_DECREMENTER, "timer", exception_decrementer);
#ifdef CONFIG_UDEBUG
exc_register(VECTOR_PROGRAM, "program", exception_program);
#endif
}
 
/** @}
/branches/tracing/kernel/arch/amd64/src/debugger.c
342,6 → 342,7
dr6 = read_dr6();
 
#ifdef CONFIG_UDEBUG
if (dr6 & DR6_BS) {
if (THREAD && istate_from_uspace(istate)) {
/*
352,6 → 353,7
return;
}
}
#endif
 
/* Set RF to restart the instruction */
#ifdef amd64
/branches/tracing/kernel/arch/mips32/src/exception.c
48,6 → 48,7
#include <console/kconsole.h>
#include <ddi/irq.h>
#include <arch/debugger.h>
#include <udebug/udebug.h>
 
static char * exctable[] = {
"Interrupt",
107,11 → 108,13
 
static void breakpoint_exception(int n, istate_t *istate)
{
#ifdef CONFIG_UDEBUG
if (istate_from_uspace(istate)) {
/* userspace breakpoint */
udebug_breakpoint_event(0);
return;
}
#endif
 
#ifdef CONFIG_DEBUG
debugger_bpoint(istate);
/branches/tracing/kernel/arch/ia32/Makefile.inc
160,5 → 160,10
arch/$(ARCH)/src/boot/boot.S \
arch/$(ARCH)/src/boot/memmap.c \
arch/$(ARCH)/src/fpu_context.c \
arch/$(ARCH)/src/debugger.c \
arch/$(ARCH)/src/debugger.c
 
ifeq ($(CONFIG_UDEBUG),y)
ARCH_SOURCES += \
arch/$(ARCH)/src/breakpoint.c
endif
/branches/tracing/kernel/arch/ia32/src/ia32.c
98,8 → 98,11
/* Enable debugger */
debugger_init();
 
#ifdef CONFIG_UDEBUG
/* Enable INT3 breakpoint handler */
breakpoint_init();
#endif
/* Merge all memory zones to 1 big zone */
zone_merge_all();
}