diff --git a/vm.cpp b/vm.cpp index 2a12f40b8..58e12189a 100644 --- a/vm.cpp +++ b/vm.cpp @@ -532,32 +532,6 @@ RoxorCore::debug_outers(Class k) printf("\n"); } -void -rb_vm_print_backtrace() -{ - void *callstack[128]; - int callstack_n = backtrace(callstack, 128); - - for (int i = 0; i < callstack_n; i++) { - char path[PATH_MAX]; - char name[100]; - unsigned long ln = 0; - - path[0] = name[0] = '\0'; - - if (GET_CORE()->symbolize_call_address(callstack[i], path, sizeof path, - &ln, name, sizeof name, NULL) - && name[0] != '\0' && path[0] != '\0') { - if (ln == 0) { - printf("%s:in `%s'\n", path, name); - } - else { - printf("%s:%ld:in `%s'\n", path, ln, name); - } - } - } -} - #if !defined(MACRUBY_STATIC) void RoxorCore::optimize(Function *func) @@ -3463,14 +3437,6 @@ RoxorVM::pop_current_exception(int pos) return; } - if ((size_t)pos >= current_exceptions.size()) { - printf("pos: %d, current_exceptions.size(): %d\n", - pos, (int)current_exceptions.size()); - rb_vm_print_backtrace(); - debug_exceptions(); - return; - } - assert((size_t)pos < current_exceptions.size()); std::vector::iterator iter = current_exceptions.end() - (pos + 1);