mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
MSVC backtrace
This commit is contained in:
committed by
Alexander Medvednikov
parent
714d61aed7
commit
51663520c8
@@ -19,6 +19,9 @@ CommonCHeaders = '
|
||||
#include <sys/time.h>
|
||||
#include <unistd.h> // sleep
|
||||
#else
|
||||
#if defined(_MSC_VER)
|
||||
#pragma comment(lib, "Dbghelp.lib")
|
||||
#endif
|
||||
#if defined(__MSVCRT_VERSION__) && __MSVCRT_VERSION__ < __MSVCR90_DLL
|
||||
#error Please upgrade your MinGW distribution to use msvcr90.dll or later.
|
||||
#endif
|
||||
|
||||
@@ -3,7 +3,7 @@ module compiler
|
||||
import os
|
||||
|
||||
#flag windows -l shell32
|
||||
|
||||
#flag windows -l dbghelp
|
||||
// RegOpenKeyExA etc
|
||||
#flag windows -l advapi32
|
||||
|
||||
|
||||
11
vlib/compiler/tests/backtrace_test.v
Normal file
11
vlib/compiler/tests/backtrace_test.v
Normal file
@@ -0,0 +1,11 @@
|
||||
/*
|
||||
Test for backtrace capability
|
||||
*/
|
||||
fn a_method() {
|
||||
print_backtrace()
|
||||
}
|
||||
|
||||
fn test_backtrace() {
|
||||
a_method()
|
||||
//panic('hi')
|
||||
}
|
||||
Reference in New Issue
Block a user