From e63d602289b0914b59010468d7303df9b8c97dd2 Mon Sep 17 00:00:00 2001 From: Kyle Huey Date: Wed, 28 Apr 2021 09:51:47 -0700 Subject: [PATCH] Mark some singlestep flag functions const. --- src/Registers.cc | 4 ++-- src/Registers.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Registers.cc b/src/Registers.cc index e6e610924ed..62258c7e5cf 100644 --- a/src/Registers.cc +++ b/src/Registers.cc @@ -659,7 +659,7 @@ void Registers::set_from_trace(SupportedArch a, const void* data, memcpy(&u.arm64regs, data, sizeof(u.arm64regs)); } -bool Registers::aarch64_singlestep_flag() { +bool Registers::aarch64_singlestep_flag() const { switch (arch()) { case aarch64: return pstate() & AARCH64_DBG_SPSR_SS; @@ -679,7 +679,7 @@ void Registers::set_aarch64_singlestep_flag() { } } -bool Registers::x86_singlestep_flag() { +bool Registers::x86_singlestep_flag() const { switch (arch()) { case x86: case x86_64: diff --git a/src/Registers.h b/src/Registers.h index 21c71713c55..bbc5233c294 100644 --- a/src/Registers.h +++ b/src/Registers.h @@ -424,7 +424,7 @@ class Registers { * Modify the processor's single step flag. On x86 this is the TF flag in the * eflags register. */ - bool x86_singlestep_flag(); + bool x86_singlestep_flag() const; void clear_x86_singlestep_flag(); /** @@ -441,7 +441,7 @@ class Registers { * likely already be clear, and we'd take a single step exception without * ever having executed any userspace instructions whatsoever. */ - bool aarch64_singlestep_flag(); + bool aarch64_singlestep_flag() const; void set_aarch64_singlestep_flag(); void print_register_file(FILE* f) const;