Skip to content

Commit

Permalink
Mark some singlestep flag functions const.
Browse files Browse the repository at this point in the history
  • Loading branch information
khuey committed Apr 28, 2021
1 parent 878f756 commit e63d602
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/Registers.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions src/Registers.h
Original file line number Diff line number Diff line change
Expand Up @@ -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();

/**
Expand All @@ -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;
Expand Down

0 comments on commit e63d602

Please sign in to comment.