Print line numbers in stack traces, if we know them.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@3090 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
90c028c812
commit
b4defb722a
1 changed files with 7 additions and 1 deletions
|
@ -96,6 +96,7 @@ void PR_StackTrace (progfuncs_t *progfuncs)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
pr_stack[pr_depth].f = pr_xfunction;
|
pr_stack[pr_depth].f = pr_xfunction;
|
||||||
|
pr_stack[pr_depth].s = pr_xstatement;
|
||||||
for (i=pr_depth ; i>0 ; i--)
|
for (i=pr_depth ; i>0 ; i--)
|
||||||
{
|
{
|
||||||
f = pr_stack[i].f;
|
f = pr_stack[i].f;
|
||||||
|
@ -115,7 +116,12 @@ void PR_StackTrace (progfuncs_t *progfuncs)
|
||||||
if (!f->s_file)
|
if (!f->s_file)
|
||||||
printf ("stripped : %s\n", f->s_name+progfuncs->stringtable);
|
printf ("stripped : %s\n", f->s_name+progfuncs->stringtable);
|
||||||
else
|
else
|
||||||
printf ("%12s : %s\n", f->s_file+progfuncs->stringtable, f->s_name+progfuncs->stringtable);
|
{
|
||||||
|
if (pr_progstate[progs].linenums)
|
||||||
|
printf ("%12s %i : %s\n", f->s_file+progfuncs->stringtable, pr_progstate[progs].linenums[pr_stack[i].s], f->s_name+progfuncs->stringtable);
|
||||||
|
else
|
||||||
|
printf ("%12s : %s\n", f->s_file+progfuncs->stringtable, f->s_name+progfuncs->stringtable);
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef STACKTRACE
|
#ifdef STACKTRACE
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue