Force builtin function descriptors to have a name.

That is, the descriptors loaded from the progs file. Some compilers (eg,
fteqcc :P) strip builtin names from the progs, which makes debugging
difficult.
This commit is contained in:
Bill Currie 2012-07-13 10:22:25 +09:00
parent 1100596431
commit a9adc94aa8
2 changed files with 3 additions and 1 deletions

View file

@ -208,6 +208,8 @@ PR_RelocateBuiltins (progs_t *pr)
bi_name, -desc->first_statement);
proc = bi_no_function;
}
if (!desc->s_name && bi)
desc->s_name = PR_SetString (pr, bi->name);
func->first_statement = desc->first_statement;
func->func = proc;
}

View file

@ -318,8 +318,8 @@ pr_run_ctors (progs_t *pr)
}
static int (*load_funcs_1[])(progs_t *) = {
PR_RelocateBuiltins,
PR_LoadStrings,
PR_RelocateBuiltins,
PR_LoadDebug,
0,
};