Skip to content

Commit

Permalink
Write isStackPointer in terms of getStackPointer
Browse files Browse the repository at this point in the history
This also now includes StackTop.
  • Loading branch information
hainest committed Oct 30, 2023
1 parent cf4857d commit 5622110
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions common/src/registers/MachRegister.C
Expand Up @@ -463,8 +463,8 @@ namespace Dyninst {
}

bool MachRegister::isStackPointer() const {
return (*this == x86_64::rsp || *this == x86::esp || *this == ppc32::r1 || *this == ppc64::r1 ||
*this == aarch64::sp);
if(*this == InvalidReg) return false;
return *this == StackTop || *this == getStackPointer(getArchitecure());
}

bool MachRegister::isSyscallNumberReg() const {
Expand Down

0 comments on commit 5622110

Please sign in to comment.