// howmany = atoi(Cmd_Argv(1));
if(Cmd_Argc() != 2)
{
- Con_Print("prvm_profile <program name>\n");
+ Con_Printf("prvm_profile <program name>\n");
return;
}
prog = oldprog;
}
-void PRVM_Crash()
+void PRVM_PrintState(void)
{
int i;
-
- if (prog->depth < 1)
- {
- // kill the stack just to be sure
- prog->depth = 0;
- prog->localstack_used = 0;
- return;
- }
-
- Con_Printf("QuakeC crash report for %s:\n", PRVM_NAME);
if (prog->xfunction)
{
for (i = -4;i <= 0;i++)
else
Con_Printf("null function executing??\n");
PRVM_StackTrace ();
+}
+
+void PRVM_Crash()
+{
+ if (prog->depth < 1)
+ {
+ // kill the stack just to be sure
+ prog->depth = 0;
+ prog->localstack_used = 0;
+ return;
+ }
+
+ Con_Printf("QuakeC crash report for %s:\n", PRVM_NAME);
+ PRVM_PrintState();
// dump the stack so host_error can shutdown functions
prog->depth = 0;