no code to dump for a null function

This commit is contained in:
Bill Currie 2003-08-24 05:08:47 +00:00
parent 5d8bebfff8
commit 253d19876c

View file

@ -407,23 +407,25 @@ PR_Get_Local_Def (progs_t *pr, int offs)
void
PR_DumpState (progs_t *pr)
{
if (pr_debug->int_val && pr->debug) {
pr_lineno_t *lineno;
pr_auxfunction_t *func = 0;
int addr = pr->pr_xstatement;
if (pr->pr_xfunction) {
if (pr_debug->int_val && pr->debug) {
pr_lineno_t *lineno;
pr_auxfunction_t *func = 0;
int addr = pr->pr_xstatement;
lineno = PR_Find_Lineno (pr, addr);
if (lineno)
func = PR_Get_Lineno_Func (pr, lineno);
if (func && pr->pr_xfunction == pr->pr_functions + func->function)
addr =PR_Get_Lineno_Addr (pr, lineno);
else
addr = max (pr->pr_xfunction->first_statement, addr - 5);
lineno = PR_Find_Lineno (pr, addr);
if (lineno)
func = PR_Get_Lineno_Func (pr, lineno);
if (func && pr->pr_xfunction == pr->pr_functions + func->function)
addr = PR_Get_Lineno_Addr (pr, lineno);
else
addr = max (pr->pr_xfunction->first_statement, addr - 5);
while (addr != pr->pr_xstatement)
PR_PrintStatement (pr, pr->pr_statements + addr++);
while (addr != pr->pr_xstatement)
PR_PrintStatement (pr, pr->pr_statements + addr++);
}
PR_PrintStatement (pr, pr->pr_statements + pr->pr_xstatement);
}
PR_PrintStatement (pr, pr->pr_statements + pr->pr_xstatement);
PR_StackTrace (pr);
}