bring back backtrace
							parent
							
								
									a83aa28a67
								
							
						
					
					
						commit
						ef9cae6dc0
					
				| 
						 | 
				
			
			@ -31,7 +31,6 @@ fn on_panic(f fn (int) int) {
 | 
			
		|||
}
 | 
			
		||||
 | 
			
		||||
pub fn print_backtrace_skipping_top_frames(skipframes int) {
 | 
			
		||||
	/*
 | 
			
		||||
	$if mac {
 | 
			
		||||
		buffer := [100]byteptr
 | 
			
		||||
		nr_ptrs := C.backtrace(*voidptr(buffer), 100)
 | 
			
		||||
| 
						 | 
				
			
			@ -78,8 +77,8 @@ pub fn print_backtrace_skipping_top_frames(skipframes int) {
 | 
			
		|||
		}
 | 
			
		||||
	}
 | 
			
		||||
	println('print_backtrace_skipping_top_frames is not implemented on this platform for now...\n')
 | 
			
		||||
	*/
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
pub fn print_backtrace(){
 | 
			
		||||
	// at the time of backtrace_symbols_fd call, the C stack would look something like this:
 | 
			
		||||
	// 1 frame for print_backtrace_skipping_top_frames
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -13,8 +13,8 @@ fn C.strlen(s byteptr) int
 | 
			
		|||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
//fn C.backtrace(a voidptr, b int) int
 | 
			
		||||
//fn C.backtrace_symbols_fd(voidptr, int, int)
 | 
			
		||||
fn backtrace(a voidptr, b int) int
 | 
			
		||||
fn backtrace_symbols_fd(voidptr, int, int)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue