mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 15:22:04 +00:00
[gamecode] Rename fields in pr_stack_t
s and f are a little too succinct.
This commit is contained in:
parent
ea1e85905c
commit
f90613bc3a
3 changed files with 16 additions and 16 deletions
|
@ -1720,8 +1720,8 @@ extern const char *pr_gametype;
|
||||||
typedef struct strref_s strref_t;
|
typedef struct strref_s strref_t;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
pr_int_t s; ///< Return statement.
|
pr_int_t staddr; ///< Return statement.
|
||||||
bfunction_t *f; ///< Calling function.
|
bfunction_t *func; ///< Calling function.
|
||||||
strref_t *tstr; ///< Linked list of temporary strings.
|
strref_t *tstr; ///< Linked list of temporary strings.
|
||||||
} prstack_t;
|
} prstack_t;
|
||||||
|
|
||||||
|
|
|
@ -1464,35 +1464,35 @@ static void
|
||||||
dump_frame (progs_t *pr, prstack_t *frame)
|
dump_frame (progs_t *pr, prstack_t *frame)
|
||||||
{
|
{
|
||||||
prdeb_resources_t *res = pr->pr_debug_resources;
|
prdeb_resources_t *res = pr->pr_debug_resources;
|
||||||
dfunction_t *f = frame->f ? frame->f->descriptor : 0;
|
dfunction_t *f = frame->func ? frame->func->descriptor : 0;
|
||||||
|
|
||||||
if (!f) {
|
if (!f) {
|
||||||
Sys_Printf ("<NO FUNCTION>\n");
|
Sys_Printf ("<NO FUNCTION>\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (pr_debug->int_val && res->debug) {
|
if (pr_debug->int_val && res->debug) {
|
||||||
pr_lineno_t *lineno = PR_Find_Lineno (pr, frame->s);
|
pr_lineno_t *lineno = PR_Find_Lineno (pr, frame->staddr);
|
||||||
pr_auxfunction_t *func = PR_Get_Lineno_Func (pr, lineno);
|
pr_auxfunction_t *func = PR_Get_Lineno_Func (pr, lineno);
|
||||||
pr_uint_t line = PR_Get_Lineno_Line (pr, lineno);
|
pr_uint_t line = PR_Get_Lineno_Line (pr, lineno);
|
||||||
pr_int_t addr = PR_Get_Lineno_Addr (pr, lineno);
|
pr_int_t addr = PR_Get_Lineno_Addr (pr, lineno);
|
||||||
|
|
||||||
line += func->source_line;
|
line += func->source_line;
|
||||||
if (addr == frame->s) {
|
if (addr == frame->staddr) {
|
||||||
Sys_Printf ("%12s:%u : %s: %x\n",
|
Sys_Printf ("%12s:%u : %s: %x\n",
|
||||||
PR_GetString (pr, f->s_file),
|
PR_GetString (pr, f->s_file),
|
||||||
line,
|
line,
|
||||||
PR_GetString (pr, f->s_name),
|
PR_GetString (pr, f->s_name),
|
||||||
frame->s);
|
frame->staddr);
|
||||||
} else {
|
} else {
|
||||||
Sys_Printf ("%12s:%u+%d : %s: %x\n",
|
Sys_Printf ("%12s:%u+%d : %s: %x\n",
|
||||||
PR_GetString (pr, f->s_file),
|
PR_GetString (pr, f->s_file),
|
||||||
line, frame->s - addr,
|
line, frame->staddr - addr,
|
||||||
PR_GetString (pr, f->s_name),
|
PR_GetString (pr, f->s_name),
|
||||||
frame->s);
|
frame->staddr);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Sys_Printf ("%12s : %s: %x\n", PR_GetString (pr, f->s_file),
|
Sys_Printf ("%12s : %s: %x\n", PR_GetString (pr, f->s_file),
|
||||||
PR_GetString (pr, f->s_name), frame->s);
|
PR_GetString (pr, f->s_name), frame->staddr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1507,8 +1507,8 @@ PR_StackTrace (progs_t *pr)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
top.s = pr->pr_xstatement;
|
top.staddr = pr->pr_xstatement;
|
||||||
top.f = pr->pr_xfunction;
|
top.func = pr->pr_xfunction;
|
||||||
dump_frame (pr, &top);
|
dump_frame (pr, &top);
|
||||||
for (i = pr->pr_depth - 1; i >= 0; i--)
|
for (i = pr->pr_depth - 1; i >= 0; i--)
|
||||||
dump_frame (pr, pr->pr_stack + i);
|
dump_frame (pr, pr->pr_stack + i);
|
||||||
|
|
|
@ -124,9 +124,9 @@ PR_PushFrame (progs_t *pr)
|
||||||
|
|
||||||
frame = pr->pr_stack + pr->pr_depth++;
|
frame = pr->pr_stack + pr->pr_depth++;
|
||||||
|
|
||||||
frame->s = pr->pr_xstatement;
|
frame->staddr = pr->pr_xstatement;
|
||||||
frame->f = pr->pr_xfunction;
|
frame->func = pr->pr_xfunction;
|
||||||
frame->tstr = pr->pr_xtstr;
|
frame->tstr = pr->pr_xtstr;
|
||||||
|
|
||||||
pr->pr_xtstr = pr->pr_pushtstr;
|
pr->pr_xtstr = pr->pr_pushtstr;
|
||||||
pr->pr_pushtstr = 0;
|
pr->pr_pushtstr = 0;
|
||||||
|
@ -158,8 +158,8 @@ PR_PopFrame (progs_t *pr)
|
||||||
// up stack
|
// up stack
|
||||||
frame = pr->pr_stack + --pr->pr_depth;
|
frame = pr->pr_stack + --pr->pr_depth;
|
||||||
|
|
||||||
pr->pr_xfunction = frame->f;
|
pr->pr_xfunction = frame->func;
|
||||||
pr->pr_xstatement = frame->s;
|
pr->pr_xstatement = frame->staddr;
|
||||||
pr->pr_xtstr = frame->tstr;
|
pr->pr_xtstr = frame->tstr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue