Skip to content

Commit

Permalink
revert apparent debug code that was committed by mistake in 31aca7b
Browse files Browse the repository at this point in the history
  • Loading branch information
Laurent Sansonetti committed Mar 30, 2011
1 parent 8483626 commit 61ee975
Showing 1 changed file with 0 additions and 34 deletions.
34 changes: 0 additions & 34 deletions vm.cpp
Expand Up @@ -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)
Expand Down Expand Up @@ -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<VALUE>::iterator iter = current_exceptions.end() - (pos + 1);
Expand Down

0 comments on commit 61ee975

Please sign in to comment.