Skip to content

Commit

Permalink
Debugger: Fix disasm at start of kernel RAM.
Browse files Browse the repository at this point in the history
We ended up with an unaligned start address for our window.
  • Loading branch information
unknownbrackets committed Apr 12, 2023
1 parent 234806d commit 10ed99a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Core/Debugger/DisassemblyManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ u32 DisassemblyManager::getNthPreviousAddress(u32 address, int n)
analyze(address-127,128);
}

return address-n*4;
return (address - n * 4) & ~3;
}

u32 DisassemblyManager::getNthNextAddress(u32 address, int n)
Expand Down Expand Up @@ -396,7 +396,7 @@ u32 DisassemblyManager::getNthNextAddress(u32 address, int n)
analyze(address);
}

return address+n*4;
return (address + n * 4) & ~3;
}

DisassemblyManager::~DisassemblyManager() {
Expand Down

0 comments on commit 10ed99a

Please sign in to comment.