1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

print_backtrace_skipping_top_frames: Implementation for MSVC

This commit is contained in:
Steven Gay
2019-11-11 03:34:53 +11:00
committed by Alexander Medvednikov
parent f8ab629986
commit d1e7a54f3a
7 changed files with 226 additions and 46 deletions

View File

@ -19,6 +19,7 @@ CommonCHeaders = '
#include <sys/time.h>
#include <unistd.h> // sleep
#else
#pragma comment(lib, "Dbghelp.lib")
#if defined(__MSVCRT_VERSION__) && __MSVCRT_VERSION__ < __MSVCR90_DLL
#error Please upgrade your MinGW distribution to use msvcr90.dll or later.
#endif

View File

@ -3,7 +3,7 @@ module compiler
import os
#flag windows -l shell32
#flag windows -l dbghelp
// RegOpenKeyExA etc
#flag windows -l advapi32

View File

@ -0,0 +1,11 @@
/*
Test for backtrace capability
*/
fn a_method() {
print_backtrace()
}
fn test_backtrace() {
a_method()
//panic('hi')
}