improve output

This commit is contained in:
Glenn Maynard
2004-06-16 03:39:43 +00:00
parent 92e389f019
commit 7cb385a56f
2 changed files with 5 additions and 1 deletions
@@ -339,6 +339,7 @@ static void RunCrashHandler( const CrashData *crash )
/* Stop other threads. XXX: This prints a spurious ptrace error if any threads /* Stop other threads. XXX: This prints a spurious ptrace error if any threads
* are already suspended, which happens in ForceCrashHandlerDeadlock(). */ * are already suspended, which happens in ForceCrashHandlerDeadlock(). */
RageThread::HaltAllThreads(); RageThread::HaltAllThreads();
fprintf(stderr, "crash\n");
/* We need to be very careful, since we're under crash conditions. Let's fork /* We need to be very careful, since we're under crash conditions. Let's fork
* a process and exec ourself to get a clean environment to work in. */ * a process and exec ourself to get a clean environment to work in. */
@@ -300,7 +300,10 @@ static void child_process()
case SIGFPE: case SIGFPE:
case SIGSEGV: case SIGSEGV:
case SIGBUS: case SIGBUS:
reason += ssprintf( " at 0x%08x", (unsigned int) crash.si.si_addr ); if( crash.si.si_code == SI_USER )
reason += ssprintf( " from pid %i", (int) crash.si.si_addr );
else
reason += ssprintf( " at 0x%08x", (unsigned int) crash.si.si_addr );
} }
break; break;
} }