mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
builtin: move C. calls to .c.v files (#11164)
This commit is contained in:
@ -15,26 +15,6 @@ fn on_panic(f fn(int)int) {
|
||||
}
|
||||
*/
|
||||
|
||||
// print_backtrace shows a backtrace of the current call stack on stdout
|
||||
pub fn print_backtrace() {
|
||||
// At the time of backtrace_symbols_fd call, the C stack would look something like this:
|
||||
// * print_backtrace_skipping_top_frames
|
||||
// * print_backtrace itself
|
||||
// * the rest of the backtrace frames
|
||||
// => top 2 frames should be skipped, since they will not be informative to the developer
|
||||
$if !no_backtrace ? {
|
||||
$if freestanding {
|
||||
println(bare_backtrace())
|
||||
} $else {
|
||||
$if tinyc {
|
||||
C.tcc_backtrace(c'Backtrace')
|
||||
} $else {
|
||||
print_backtrace_skipping_top_frames(2)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
struct VCastTypeIndexName {
|
||||
tindex int
|
||||
tname string
|
||||
|
Reference in New Issue
Block a user