internal StackFrame UnwindStack(StackFrame frame, TargetMemoryAccess memory)
{
if (!IsLoaded)
{
return(null);
}
try {
StackFrame new_frame = Module.UnwindStack(frame, memory);
if (new_frame != null)
{
return(new_frame);
}
} catch {
}
int prologue_size;
if (HasMethodBounds)
{
prologue_size = (int)(MethodStartAddress - StartAddress);
}
else
{
prologue_size = (int)(EndAddress - StartAddress);
}
int offset = (int)(frame.TargetAddress - StartAddress);
byte[] prologue = memory.ReadBuffer(StartAddress, prologue_size);
return(frame.Thread.Architecture.UnwindStack(frame, memory, prologue, offset));
}