x86: Debugger can now use dr3

This commit is contained in:
Pawel Dziepak
2013-12-17 04:31:29 +01:00
parent a5b070f1fa
commit 735f67481f
4 changed files with 4 additions and 12 deletions
@@ -62,7 +62,7 @@ void arch_syscall_64_bit_return_value(void);
static inline void
arch_thread_set_current_thread(Thread* t)
{
asm volatile("mov %0, %%gs:0" : : "r" (t));
asm volatile("mov %0, %%gs:0" : : "r" (t) : "memory");
}
@@ -9,12 +9,7 @@
#define ARCH_INIT_USER_DEBUG x86_init_user_debug
// number of breakpoints the CPU supports
// On 32-bit, DR3 is used to hold the Thread*.
#ifdef __x86_64__
# define X86_BREAKPOINT_COUNT 4
#else
# define X86_BREAKPOINT_COUNT 3
#endif
#define X86_BREAKPOINT_COUNT 4
// debug status register DR6
enum {