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:

committed by
Alexander Medvednikov

parent
f8ab629986
commit
d1e7a54f3a
@ -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
|
||||
|
@ -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