mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-28 15:02:39 +00:00
- don't include the native frames per default
This commit is contained in:
parent
7785dd1b56
commit
9a2b3792ef
3 changed files with 8 additions and 6 deletions
|
@ -5,4 +5,4 @@
|
||||||
|
|
||||||
JitFuncPtr JitCompile(VMScriptFunction *func);
|
JitFuncPtr JitCompile(VMScriptFunction *func);
|
||||||
void JitDumpLog(FILE *file, VMScriptFunction *func);
|
void JitDumpLog(FILE *file, VMScriptFunction *func);
|
||||||
FString JitCaptureStackTrace(int framesToSkip);
|
FString JitCaptureStackTrace(int framesToSkip, bool includeNativeFrames);
|
||||||
|
|
|
@ -982,20 +982,22 @@ FString JitGetStackFrameName(NativeSymbolResolver *nativeSymbols, void *pc)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return nativeSymbols->GetName(pc);
|
return nativeSymbols ? nativeSymbols->GetName(pc) : FString();
|
||||||
}
|
}
|
||||||
|
|
||||||
FString JitCaptureStackTrace(int framesToSkip)
|
FString JitCaptureStackTrace(int framesToSkip, bool includeNativeFrames)
|
||||||
{
|
{
|
||||||
void *frames[32];
|
void *frames[32];
|
||||||
int numframes = CaptureStackTrace(32, frames);
|
int numframes = CaptureStackTrace(32, frames);
|
||||||
|
|
||||||
NativeSymbolResolver nativeSymbols;
|
std::unique_ptr<NativeSymbolResolver> nativeSymbols;
|
||||||
|
if (includeNativeFrames)
|
||||||
|
nativeSymbols.reset(new NativeSymbolResolver());
|
||||||
|
|
||||||
FString s;
|
FString s;
|
||||||
for (int i = framesToSkip + 1; i < numframes; i++)
|
for (int i = framesToSkip + 1; i < numframes; i++)
|
||||||
{
|
{
|
||||||
s += JitGetStackFrameName(&nativeSymbols, frames[i]);
|
s += JitGetStackFrameName(nativeSymbols.get(), frames[i]);
|
||||||
}
|
}
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
|
@ -660,7 +660,7 @@ CVMAbortException::CVMAbortException(EVMAbortException reason, const char *morei
|
||||||
}
|
}
|
||||||
|
|
||||||
if (vm_jit)
|
if (vm_jit)
|
||||||
stacktrace = JitCaptureStackTrace(1);
|
stacktrace = JitCaptureStackTrace(1, false);
|
||||||
else
|
else
|
||||||
stacktrace = "";
|
stacktrace = "";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue