mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-30 08:00:51 +00:00
Fix debug information.
This commit is contained in:
parent
de33cd6017
commit
5eff00fdeb
2 changed files with 18 additions and 19 deletions
|
@ -626,19 +626,18 @@ build_function (function_t *f)
|
|||
void
|
||||
finish_function (function_t *f)
|
||||
{
|
||||
// FIXME
|
||||
// if (f->aux) {
|
||||
// def_t *def;
|
||||
// f->aux->function = f->function_num;
|
||||
// if (f->scope) {
|
||||
// for (def = f->scope->head; def; def = def->def_next) {
|
||||
// if (def->name) {
|
||||
// def_to_ddef (def, new_local (), 0);
|
||||
// f->aux->num_locals++;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
if (f->aux) {
|
||||
def_t *def;
|
||||
f->aux->function = f->function_num;
|
||||
if (f->symtab && f->symtab->space) {
|
||||
for (def = f->symtab->space->defs; def; def = def->next) {
|
||||
if (def->name) {
|
||||
def_to_ddef (def, new_local (), 0);
|
||||
f->aux->num_locals++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -378,7 +378,6 @@ finish_compilation (void)
|
|||
qboolean errors = false;
|
||||
function_t *f;
|
||||
def_t *def;
|
||||
expr_t e;
|
||||
dfunction_t *df;
|
||||
|
||||
// check to make sure all functions prototyped have code
|
||||
|
@ -417,15 +416,16 @@ finish_compilation (void)
|
|||
if (options.code.progsversion != PROG_ID_VERSION) {
|
||||
//FIXME better init code
|
||||
symbol_t *sym = new_symbol (".param_size");
|
||||
initialize_def (sym, &type_integer, 0,
|
||||
pr.symtab->space, st_global);
|
||||
initialize_def (sym, &type_integer, 0, pr.symtab->space, st_global);
|
||||
D_INT (sym->s.def) = type_size (&type_param);
|
||||
}
|
||||
|
||||
if (options.code.debug) {
|
||||
e = *new_string_expr (debugfile);
|
||||
//FIXME ReuseConstant (&e, get_def (&type_string, ".debug_file", pr.scope,
|
||||
//FIXME st_global));
|
||||
//FIXME better init code
|
||||
symbol_t *sym = new_symbol (".debug_file");
|
||||
initialize_def (sym, &type_string, 0, pr.symtab->space, st_global);
|
||||
EMIT_STRING (sym->s.def->space, D_STRUCT (string_t, sym->s.def),
|
||||
debugfile);
|
||||
}
|
||||
|
||||
for (def = pr.near_data->defs; def; def = def->next)
|
||||
|
|
Loading…
Reference in a new issue