1
0

Windows: remove extra newlines in backtrace (#5218)

- Remove DLL lines, not generally needed.
This commit is contained in:
Tiger Wang 2021-05-06 15:25:12 +01:00 committed by GitHub
parent a62b2b1be2
commit ce8d8388d6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -26,7 +26,7 @@ void PrintStackTrace(void)
{ {
virtual void OnOutput(LPCSTR szText) override virtual void OnOutput(LPCSTR szText) override
{ {
puts(szText); std::fprintf(stdout, szText);
} }
} sw; } sw;
sw.ShowCallstack(); sw.ShowCallstack();

View File

@ -1154,6 +1154,9 @@ BOOL __stdcall WinStackWalker::myReadProcMem(
void WinStackWalker::OnLoadModule(LPCSTR img, LPCSTR mod, DWORD64 baseAddr, DWORD size, DWORD result, LPCSTR symType, LPCSTR pdbName, ULONGLONG fileVersion) void WinStackWalker::OnLoadModule(LPCSTR img, LPCSTR mod, DWORD64 baseAddr, DWORD size, DWORD result, LPCSTR symType, LPCSTR pdbName, ULONGLONG fileVersion)
{ {
/*
// Uncomment to be notified of loaded DLL modules.
char buffer[STACKWALK_MAX_NAMELEN]; char buffer[STACKWALK_MAX_NAMELEN];
if (fileVersion == 0) if (fileVersion == 0)
{ {
@ -1168,6 +1171,7 @@ void WinStackWalker::OnLoadModule(LPCSTR img, LPCSTR mod, DWORD64 baseAddr, DWOR
_snprintf_s(buffer, sizeof(buffer), "%s:%s (%p), size: %d (result: %d), SymType: '%s', PDB: '%s', fileVersion: %d.%d.%d.%d\n", img, mod, (LPVOID)baseAddr, size, result, symType, pdbName, v1, v2, v3, v4); _snprintf_s(buffer, sizeof(buffer), "%s:%s (%p), size: %d (result: %d), SymType: '%s', PDB: '%s', fileVersion: %d.%d.%d.%d\n", img, mod, (LPVOID)baseAddr, size, result, symType, pdbName, v1, v2, v3, v4);
} }
OnOutput(buffer); OnOutput(buffer);
*/
} }