зеркало из https://github.com/mozilla/pjs.git
Change nsTraceRefcnt::WalkTheStack() to accept stream.
This commit is contained in:
Родитель
52db4c3a39
Коммит
85a3c5e01e
|
@ -124,28 +124,8 @@ ah_crap_handler(int signum)
|
|||
getpid(),
|
||||
strsignal(signum));
|
||||
|
||||
char stack[4096];
|
||||
|
||||
nsTraceRefcnt::WalkTheStack(stack, sizeof(stack));
|
||||
|
||||
// Convert all spaces between symbols to newlines for readability
|
||||
char * needle = "+0x";
|
||||
char * haystack = stack;
|
||||
char * sp = NULL;
|
||||
|
||||
while((sp = strstr(haystack,needle)))
|
||||
{
|
||||
char * ws = strchr(sp,' ');
|
||||
|
||||
if (ws)
|
||||
{
|
||||
*ws = '\n';
|
||||
|
||||
haystack = ws + 1;
|
||||
}
|
||||
}
|
||||
|
||||
printf("stack = %s\n\n",stack);
|
||||
printf("stack\n",stack);
|
||||
nsTraceRefcnt::WalkTheStack(stdout);
|
||||
|
||||
printf("Sleeping for 5 minutes.\n");
|
||||
printf("Type 'gdb %s %d' to attatch your debugger to this thread.\n",
|
||||
|
|
|
@ -648,28 +648,8 @@ ah_crap_handler(int signum)
|
|||
getpid(),
|
||||
strsignal(signum));
|
||||
|
||||
char stack[4096];
|
||||
|
||||
nsTraceRefcnt::WalkTheStack(stack, sizeof(stack));
|
||||
|
||||
// Convert all spaces between symbols to newlines for readability
|
||||
char * needle = "+0x";
|
||||
char * haystack = stack;
|
||||
char * sp = NULL;
|
||||
|
||||
while((sp = strstr(haystack,needle)))
|
||||
{
|
||||
char * ws = strchr(sp,' ');
|
||||
|
||||
if (ws)
|
||||
{
|
||||
*ws = '\n';
|
||||
|
||||
haystack = ws + 1;
|
||||
}
|
||||
}
|
||||
|
||||
printf("stack = %s\n\n",stack);
|
||||
printf("stack\n",stack);
|
||||
nsTraceRefcnt::WalkTheStack(stdout);
|
||||
|
||||
printf("Sleeping for 5 minutes.\n");
|
||||
printf("Type 'gdb %s %d' to attatch your debugger to this thread.\n",
|
||||
|
|
Загрузка…
Ссылка в новой задаче