builtin: skip print_backtraces on panics with tcc, it does it automatically

pull/5806/head
Delyan Angelov 2020-07-11 17:51:02 +03:00
parent 9b4c81e85f
commit 498c8cfc8e
1 changed files with 8 additions and 2 deletions

View File

@ -43,14 +43,20 @@ fn panic_debug(line_no int, file, mod, fn_name, s string) {
eprintln(' file: $file') eprintln(' file: $file')
eprintln(' line: ' + line_no.str()) eprintln(' line: ' + line_no.str())
eprintln('=========================================') eprintln('=========================================')
print_backtrace_skipping_top_frames(1) // recent versions of tcc print better backtraces automatically
$if !tinyc {
print_backtrace_skipping_top_frames(1)
}
break_if_debugger_attached() break_if_debugger_attached()
C.exit(1) C.exit(1)
} }
pub fn panic(s string) { pub fn panic(s string) {
eprintln('V panic: $s') eprintln('V panic: $s')
print_backtrace() // recent versions of tcc print better backtraces automatically
$if !tinyc {
print_backtrace()
}
break_if_debugger_attached() break_if_debugger_attached()
C.exit(1) C.exit(1)
} }