Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 3891 → Rev 3892

/trunk/kernel/arch/amd64/src/proc/scheduler.c
39,7 → 39,6
#include <arch.h>
#include <arch/context.h> /* SP_DELTA */
#include <arch/asm.h>
#include <arch/debugger.h>
#include <print.h>
#include <arch/pm.h>
#include <arch/ddi/ddi.h>
68,13 → 67,6
 
/* TLS support - set FS to thread local storage */
write_msr(AMD_MSR_FS, THREAD->arch.tls);
 
#ifdef CONFIG_DEBUG_AS_WATCHPOINT
/* Set watchpoint on AS to ensure that nobody sets it to zero */
if (CPU->id < BKPOINTS_MAX)
breakpoint_add(&((the_t *) THREAD->kstack)->as,
BKPOINT_WRITE | BKPOINT_CHECK_ZERO, CPU->id);
#endif
}
 
void after_thread_ran_arch(void)
/trunk/kernel/arch/amd64/src/debugger.c
64,8 → 64,6
.argc = 0,
};
 
#ifndef CONFIG_DEBUG_AS_WATCHPOINT
 
static int cmd_del_breakpoint(cmd_arg_t *argv);
static cmd_arg_t del_argv = {
.type = ARG_TYPE_INT
101,7 → 99,6
.argv = &addw_argv
};
 
#endif /* CONFIG_DEBUG_AS_WATCHPOINT */
#endif /* CONFIG_KCONSOLE */
 
/* Setup DR register according to table */
320,7 → 317,6
if (!cmd_register(&bkpts_info))
printf("Cannot register command %s\n", bkpts_info.name);
 
#ifndef CONFIG_DEBUG_AS_WATCHPOINT
cmd_initialize(&delbkpt_info);
if (!cmd_register(&delbkpt_info))
printf("Cannot register command %s\n", delbkpt_info.name);
332,7 → 328,6
cmd_initialize(&addwatchp_info);
if (!cmd_register(&addwatchp_info))
printf("Cannot register command %s\n", addwatchp_info.name);
#endif /* CONFIG_DEBUG_AS_WATCHPOINT */
#endif /* CONFIG_KCONSOLE */
exc_register(VECTOR_DEBUG, "debugger", debug_exception);
378,8 → 373,6
return 1;
}
 
#ifndef CONFIG_DEBUG_AS_WATCHPOINT
 
/** Remove breakpoint from table */
int cmd_del_breakpoint(cmd_arg_t *argv)
{
412,7 → 405,6
return 1;
}
#endif /* CONFIG_DEBUG_AS_WATCHPOINT */
#endif /* CONFIG_KCONSOLE */
 
/** @}
/trunk/kernel/arch/ia32/src/proc/scheduler.c
38,7 → 38,6
#include <proc/thread.h>
#include <arch.h>
#include <arch/context.h> /* SP_DELTA */
#include <arch/debugger.h>
#include <arch/pm.h>
#include <arch/asm.h>
#include <arch/ddi/ddi.h>
70,15 → 69,6
 
/* Set up TLS in GS register */
set_tls_desc(THREAD->arch.tls);
 
#ifdef CONFIG_DEBUG_AS_WATCHPOINT
/* Set watchpoint on AS to ensure that nobody sets it to zero */
if (CPU->id < BKPOINTS_MAX) {
the_t *the = THE;
breakpoint_add(&((the_t *) the->thread->kstack)->as,
BKPOINT_WRITE | BKPOINT_CHECK_ZERO, the->cpu->id);
}
#endif
}
 
void after_thread_ran_arch(void)
/trunk/HelenOS.config
328,9 → 328,6
% Deadlock detection support for spinlocks
! [CONFIG_DEBUG=y&CONFIG_SMP=y] CONFIG_DEBUG_SPINLOCK (y/n)
 
% Watchpoint on rewriting AS with zero
! [CONFIG_DEBUG=y&(PLATFORM=amd64|PLATFORM=ia32)] CONFIG_DEBUG_AS_WATCHPOINT (y/n)
 
% Compile kernel tests
! CONFIG_TEST (y/n)