Xen Test Framework
|
x86 Debug Register Infrastructure More...
#include <xtf/macro_magic.h>
Go to the source code of this file.
Macros | |
#define | X86_DR6_B0 (1u << 0) /* Breakpoint 0 triggered */ |
#define | X86_DR6_B1 (1u << 1) /* Breakpoint 1 triggered */ |
#define | X86_DR6_B2 (1u << 2) /* Breakpoint 2 triggered */ |
#define | X86_DR6_B3 (1u << 3) /* Breakpoint 3 triggered */ |
#define | X86_DR6_BD (1u << 13) /* Debug register accessed */ |
#define | X86_DR6_BS (1u << 14) /* Single step */ |
#define | X86_DR6_BT (1u << 15) /* Task switch */ |
#define | X86_DR6_RTM (1u << 16) /* #DB/#BP in RTM region */ |
#define | X86_DR6_DEFAULT 0xffff0ff0 |
#define | X86_DR7_LE (1u << 8) /* Local Exact Breakpoints */ |
#define | X86_DR7_GE (1u << 9) /* Global Exact Breakpoints */ |
#define | X86_DR7_RTM (1u << 11) /* Debugging in RTM regions */ |
#define | X86_DR7_GD (1u << 13) /* General Detect */ |
#define | X86_DR7_DEFAULT 0x00000400 |
#define | X86_DR7_0_L (1u << 0) |
#define | X86_DR7_1_L (1u << 2) |
#define | X86_DR7_2_L (1u << 4) |
#define | X86_DR7_3_L (1u << 6) |
#define | X86_DR7_0_G (1u << 1) |
#define | X86_DR7_1_G (1u << 3) |
#define | X86_DR7_2_G (1u << 5) |
#define | X86_DR7_3_G (1u << 7) |
#define | X86_DR7_0_X (0u << 16) |
#define | X86_DR7_0_W (1u << 16) |
#define | X86_DR7_0_IO (2u << 16) |
#define | X86_DR7_0_RW (3u << 16) |
#define | X86_DR7_0_8 (0u << 18) |
#define | X86_DR7_0_16 (1u << 18) |
#define | X86_DR7_0_64 (2u << 18) |
#define | X86_DR7_0_32 (3u << 18) |
#define | X86_DR7_1_X (0u << 20) |
#define | X86_DR7_1_W (1u << 20) |
#define | X86_DR7_1_IO (2u << 20) |
#define | X86_DR7_1_RW (3u << 20) |
#define | X86_DR7_1_8 (0u << 22) |
#define | X86_DR7_1_16 (1u << 22) |
#define | X86_DR7_1_64 (2u << 22) |
#define | X86_DR7_1_32 (3u << 22) |
#define | X86_DR7_2_X (0u << 24) |
#define | X86_DR7_2_W (1u << 24) |
#define | X86_DR7_2_IO (2u << 24) |
#define | X86_DR7_2_RW (3u << 24) |
#define | X86_DR7_2_8 (0u << 26) |
#define | X86_DR7_2_16 (1u << 26) |
#define | X86_DR7_2_64 (2u << 26) |
#define | X86_DR7_2_32 (3u << 26) |
#define | X86_DR7_3_X (0u << 28) |
#define | X86_DR7_3_W (1u << 28) |
#define | X86_DR7_3_IO (2u << 28) |
#define | X86_DR7_3_RW (3u << 28) |
#define | X86_DR7_3_8 (0u << 30) |
#define | X86_DR7_3_16 (1u << 30) |
#define | X86_DR7_3_64 (2u << 30) |
#define | X86_DR7_3_32 (3u << 30) |
#define | DR7_SYM(bp, ...) TOK_OR(X86_DR7_ ## bp ## _, ##__VA_ARGS__) |
Create a partial %dr7 setting for a particular breakpoint based on mnemonics. More... | |
Functions | |
static unsigned long | read_dr0 (void) |
static void | write_dr0 (unsigned long linear) |
static unsigned long | read_dr1 (void) |
static void | write_dr1 (unsigned long linear) |
static unsigned long | read_dr2 (void) |
static void | write_dr2 (unsigned long linear) |
static unsigned long | read_dr3 (void) |
static void | write_dr3 (unsigned long linear) |
static unsigned long | read_dr6 (void) |
static void | write_dr6 (unsigned long val) |
static unsigned long | read_dr7 (void) |
static void | write_dr7 (unsigned long val) |
x86 Debug Register Infrastructure
Definition in file x86-dbg-reg.h.
#define X86_DR6_B0 (1u << 0) /* Breakpoint 0 triggered */ |
Definition at line 15 of file x86-dbg-reg.h.
#define X86_DR6_B1 (1u << 1) /* Breakpoint 1 triggered */ |
Definition at line 16 of file x86-dbg-reg.h.
#define X86_DR6_B2 (1u << 2) /* Breakpoint 2 triggered */ |
Definition at line 17 of file x86-dbg-reg.h.
#define X86_DR6_B3 (1u << 3) /* Breakpoint 3 triggered */ |
Definition at line 18 of file x86-dbg-reg.h.
#define X86_DR6_BD (1u << 13) /* Debug register accessed */ |
Definition at line 19 of file x86-dbg-reg.h.
#define X86_DR6_BS (1u << 14) /* Single step */ |
Definition at line 20 of file x86-dbg-reg.h.
#define X86_DR6_BT (1u << 15) /* Task switch */ |
Definition at line 21 of file x86-dbg-reg.h.
#define X86_DR6_RTM (1u << 16) /* #DB/#BP in RTM region */ |
Definition at line 22 of file x86-dbg-reg.h.
#define X86_DR6_DEFAULT 0xffff0ff0 |
Definition at line 24 of file x86-dbg-reg.h.
#define X86_DR7_LE (1u << 8) /* Local Exact Breakpoints */ |
Definition at line 29 of file x86-dbg-reg.h.
#define X86_DR7_GE (1u << 9) /* Global Exact Breakpoints */ |
Definition at line 30 of file x86-dbg-reg.h.
#define X86_DR7_RTM (1u << 11) /* Debugging in RTM regions */ |
Definition at line 31 of file x86-dbg-reg.h.
#define X86_DR7_GD (1u << 13) /* General Detect */ |
Definition at line 32 of file x86-dbg-reg.h.
#define X86_DR7_DEFAULT 0x00000400 |
Definition at line 34 of file x86-dbg-reg.h.
#define X86_DR7_0_L (1u << 0) |
Definition at line 39 of file x86-dbg-reg.h.
#define X86_DR7_1_L (1u << 2) |
Definition at line 40 of file x86-dbg-reg.h.
#define X86_DR7_2_L (1u << 4) |
Definition at line 41 of file x86-dbg-reg.h.
#define X86_DR7_3_L (1u << 6) |
Definition at line 42 of file x86-dbg-reg.h.
#define X86_DR7_0_G (1u << 1) |
Definition at line 44 of file x86-dbg-reg.h.
#define X86_DR7_1_G (1u << 3) |
Definition at line 45 of file x86-dbg-reg.h.
#define X86_DR7_2_G (1u << 5) |
Definition at line 46 of file x86-dbg-reg.h.
#define X86_DR7_3_G (1u << 7) |
Definition at line 47 of file x86-dbg-reg.h.
#define X86_DR7_0_X (0u << 16) |
Definition at line 49 of file x86-dbg-reg.h.
#define X86_DR7_0_W (1u << 16) |
Definition at line 50 of file x86-dbg-reg.h.
#define X86_DR7_0_IO (2u << 16) |
Definition at line 51 of file x86-dbg-reg.h.
#define X86_DR7_0_RW (3u << 16) |
Definition at line 52 of file x86-dbg-reg.h.
#define X86_DR7_0_8 (0u << 18) |
Definition at line 54 of file x86-dbg-reg.h.
#define X86_DR7_0_16 (1u << 18) |
Definition at line 55 of file x86-dbg-reg.h.
#define X86_DR7_0_64 (2u << 18) |
Definition at line 56 of file x86-dbg-reg.h.
#define X86_DR7_0_32 (3u << 18) |
Definition at line 57 of file x86-dbg-reg.h.
#define X86_DR7_1_X (0u << 20) |
Definition at line 59 of file x86-dbg-reg.h.
#define X86_DR7_1_W (1u << 20) |
Definition at line 60 of file x86-dbg-reg.h.
#define X86_DR7_1_IO (2u << 20) |
Definition at line 61 of file x86-dbg-reg.h.
#define X86_DR7_1_RW (3u << 20) |
Definition at line 62 of file x86-dbg-reg.h.
#define X86_DR7_1_8 (0u << 22) |
Definition at line 64 of file x86-dbg-reg.h.
#define X86_DR7_1_16 (1u << 22) |
Definition at line 65 of file x86-dbg-reg.h.
#define X86_DR7_1_64 (2u << 22) |
Definition at line 66 of file x86-dbg-reg.h.
#define X86_DR7_1_32 (3u << 22) |
Definition at line 67 of file x86-dbg-reg.h.
#define X86_DR7_2_X (0u << 24) |
Definition at line 69 of file x86-dbg-reg.h.
#define X86_DR7_2_W (1u << 24) |
Definition at line 70 of file x86-dbg-reg.h.
#define X86_DR7_2_IO (2u << 24) |
Definition at line 71 of file x86-dbg-reg.h.
#define X86_DR7_2_RW (3u << 24) |
Definition at line 72 of file x86-dbg-reg.h.
#define X86_DR7_2_8 (0u << 26) |
Definition at line 74 of file x86-dbg-reg.h.
#define X86_DR7_2_16 (1u << 26) |
Definition at line 75 of file x86-dbg-reg.h.
#define X86_DR7_2_64 (2u << 26) |
Definition at line 76 of file x86-dbg-reg.h.
#define X86_DR7_2_32 (3u << 26) |
Definition at line 77 of file x86-dbg-reg.h.
#define X86_DR7_3_X (0u << 28) |
Definition at line 79 of file x86-dbg-reg.h.
#define X86_DR7_3_W (1u << 28) |
Definition at line 80 of file x86-dbg-reg.h.
#define X86_DR7_3_IO (2u << 28) |
Definition at line 81 of file x86-dbg-reg.h.
#define X86_DR7_3_RW (3u << 28) |
Definition at line 82 of file x86-dbg-reg.h.
#define X86_DR7_3_8 (0u << 30) |
Definition at line 84 of file x86-dbg-reg.h.
#define X86_DR7_3_16 (1u << 30) |
Definition at line 85 of file x86-dbg-reg.h.
#define X86_DR7_3_64 (2u << 30) |
Definition at line 86 of file x86-dbg-reg.h.
#define X86_DR7_3_32 (3u << 30) |
Definition at line 87 of file x86-dbg-reg.h.
#define DR7_SYM | ( | bp, | |
... | |||
) | TOK_OR(X86_DR7_ ## bp ## _, ##__VA_ARGS__) |
Create a partial %dr7 setting for a particular breakpoint based on mnemonics.
bp | Breakpoint. Must be in the range 0 ... 3 |
... | Partial X86_DR7_ tokens |
Example usage:
Definition at line 100 of file x86-dbg-reg.h.
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
Definition at line 125 of file x86-dbg-reg.h.
|
inlinestatic |
|
inlinestatic |
Definition at line 139 of file x86-dbg-reg.h.
|
inlinestatic |
|
inlinestatic |
Definition at line 153 of file x86-dbg-reg.h.
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |