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

disable backtrace for now

This commit is contained in:
Alexander Medvednikov 2019-10-25 17:26:17 +03:00
parent 32b3611026
commit d0cbb4041b
3 changed files with 5 additions and 3 deletions

View File

@ -31,6 +31,7 @@ fn on_panic(f fn (int) int) {
} }
pub fn print_backtrace_skipping_top_frames(skipframes int) { pub fn print_backtrace_skipping_top_frames(skipframes int) {
/*
$if mac { $if mac {
buffer := [100]byteptr buffer := [100]byteptr
nr_ptrs := C.backtrace(*voidptr(buffer), 100) nr_ptrs := C.backtrace(*voidptr(buffer), 100)
@ -77,6 +78,7 @@ pub fn print_backtrace_skipping_top_frames(skipframes int) {
} }
} }
println('print_backtrace_skipping_top_frames is not implemented on this platform for now...\n') println('print_backtrace_skipping_top_frames is not implemented on this platform for now...\n')
*/
} }
pub fn print_backtrace(){ pub fn print_backtrace(){
// at the time of backtrace_symbols_fd call, the C stack would look something like this: // at the time of backtrace_symbols_fd call, the C stack would look something like this:

View File

@ -13,8 +13,8 @@ fn C.strlen(s byteptr) int
fn backtrace(a voidptr, b int) int //fn C.backtrace(a voidptr, b int) int
fn backtrace_symbols_fd(voidptr, int, int) //fn C.backtrace_symbols_fd(voidptr, int, int)

View File

@ -26,7 +26,7 @@ CommonCHeaders = '
#ifdef __linux__ #ifdef __linux__
//#if !defined(__BIONIC__) && !defined(__GNUC_PREREQ) //#if !defined(__BIONIC__) && !defined(__GNUC_PREREQ)
#include <execinfo.h> // backtrace and backtrace_symbols_fd //#include <execinfo.h> // backtrace and backtrace_symbols_fd
//#endif //#endif
#pragma weak backtrace #pragma weak backtrace