Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debugger: Accept format for watches and stack walk tweak #17260

Merged
merged 3 commits into from
Apr 10, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Debugger: Correct stack walk at start of func.
  • Loading branch information
unknownbrackets committed Apr 9, 2023
commit a37f0c256da118b1d07803c26af8e19f3048d952
13 changes: 10 additions & 3 deletions Core/MIPS/MIPSStackWalk.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,17 @@ namespace MIPSStackWalk {
const u32 LONGEST_FUNCTION = 1024 * 1024;
// TODO: Check if found entry is in the same symbol? Might be wrong sometimes...

if (entry != INVALIDTARGET && frame.pc == entry) {
// This happens when we're at the start of a function. Our ra is already correct.
frame.entry = entry;
// This function may consume stack, but the frame hasn't used it yet.
frame.stackSize = 0;
return true;
}

int ra_offset = -1;
const u32 start = frame.pc;
// Start one instruction before the current frame pc, as that hasn't run yet.
const u32 start = frame.pc - 4;
u32 stop = entry;
if (entry == INVALIDTARGET) {
if (start >= PSP_GetUserMemoryBase()) {
Expand Down Expand Up @@ -190,6 +199,4 @@ namespace MIPSStackWalk {

return frames;
}


};