summaryrefslogtreecommitdiff
path: root/src/arch/amd64/cpu/debugger.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/amd64/cpu/debugger.c')
-rw-r--r--src/arch/amd64/cpu/debugger.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/arch/amd64/cpu/debugger.c b/src/arch/amd64/cpu/debugger.c
index 4d9d3c3..0f48b84 100644
--- a/src/arch/amd64/cpu/debugger.c
+++ b/src/arch/amd64/cpu/debugger.c
@@ -376,7 +376,7 @@ static int debugger_prompt(struct isr_regs *state) {
}
}
-void debugger(struct isr_regs *state, int cause) {
+void debugger(struct isr_regs *volatile state, int cause) {
struct dr6 dr6;
__asm__ volatile ("mov %%dr6, %0" : "=r"(dr6));
@@ -398,7 +398,8 @@ void debugger(struct isr_regs *state, int cause) {
dbg_steps = 0;
dbg_continue = 0;
- ((struct rflags *)&state->rflags)->tf = 0;
+ struct rflags *rflags = (struct rflags *) &state->rflags;
+ rflags->tf = 0;
if (dr6.b0) {
state->rip += bkps[0].instr_len;