From df302ef7d9205e7599463b4b2ba858dbff6cd1da Mon Sep 17 00:00:00 2001 From: divverent Date: Thu, 20 Dec 2012 11:37:38 +0000 Subject: [PATCH] use LNO files for backtraces (by Blub) git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11862 d7cf8633-e32d-0410-b094-e92efae38249 ::stable-branch::merge=6724642e44d68a429ef9a9e036460b99917bcce5 --- prvm_exec.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/prvm_exec.c b/prvm_exec.c index df57f66f..f2ad83ed 100644 --- a/prvm_exec.c +++ b/prvm_exec.c @@ -224,7 +224,12 @@ void PRVM_StackTrace (prvm_prog_t *prog) if (!f) Con_Print("\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); + } } } -- 2.39.2