]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
use LNO files for backtraces (by Blub)
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 20 Dec 2012 11:37:38 +0000 (11:37 +0000)
committerdivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 20 Dec 2012 11:37:38 +0000 (11:37 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11862 d7cf8633-e32d-0410-b094-e92efae38249

prvm_exec.c

index df57f66fcf62c56768a0be13df04207934a09106..f2ad83edf459fed77e436b8972c065e9a5195fdf 100644 (file)
@@ -224,7 +224,12 @@ void PRVM_StackTrace (prvm_prog_t *prog)
                if (!f)
                        Con_Print("<NULL FUNCTION>\n");
                else
-                       Con_Printf("%12s : %s : statement %i\n", PRVM_GetString(prog, f->s_file), PRVM_GetString(prog, f->s_name), prog->stack[i].s - f->first_statement);
+               {
+                       if (prog->statement_linenums)
+                               Con_Printf("%12s:%i : %s : statement %i\n", PRVM_GetString(prog, f->s_file), prog->statement_linenums[prog->stack[i].s], PRVM_GetString(prog, f->s_name), prog->stack[i].s - f->first_statement);
+                       else
+                               Con_Printf("%12s : %s : statement %i\n", PRVM_GetString(prog, f->s_file), PRVM_GetString(prog, f->s_name), prog->stack[i].s - f->first_statement);
+               }
        }
 }