MCPcopy Create free account
hub / github.com/PCSX2/pcsx2 / DetermineFrameInfo

Function DetermineFrameInfo

pcsx2/DebugTools/MipsStackWalk.cpp:168–187  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

166 }
167
168 bool DetermineFrameInfo(DebugInterface* cpu, StackFrame& frame, u32 possibleEntry, u32 threadEntry, u32& ra)
169 {
170 if (ScanForEntry(cpu, frame, possibleEntry, ra))
171 {
172 // Awesome, found one that looks right.
173 return true;
174 }
175 else if (ra != INVALIDTARGET && possibleEntry != INVALIDTARGET)
176 {
177 // Let's just assume it's a leaf.
178 frame.entry = possibleEntry;
179 frame.stackSize = 0;
180 return true;
181 }
182
183 // Okay, we failed to get one. Our possibleEntry could be wrong, it often is.
184 // Let's just scan upward.
185 u32 newPossibleEntry = frame.pc > threadEntry ? threadEntry : frame.pc - MAX_FUNC_SIZE;
186 return ScanForEntry(cpu, frame, newPossibleEntry, ra);
187 }
188
189 std::vector<StackFrame> Walk(DebugInterface* cpu, u32 pc, u32 ra, u32 sp, u32 threadEntry)
190 {

Callers 1

WalkFunction · 0.85

Calls 1

ScanForEntryFunction · 0.85

Tested by

no test coverage detected