mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-23 04:42:32 +00:00
support category dumping
This commit is contained in:
parent
04867e06bc
commit
bad252cb81
1 changed files with 16 additions and 1 deletions
|
@ -98,6 +98,21 @@ dump_class (progs_t *pr, pr_class_t *class)
|
||||||
void
|
void
|
||||||
dump_category (progs_t *pr, pr_category_t *category)
|
dump_category (progs_t *pr, pr_category_t *category)
|
||||||
{
|
{
|
||||||
|
const char *category_name = "<invalid string>";
|
||||||
|
const char *class_name = "<invalid string>";
|
||||||
|
|
||||||
|
if (PR_StringValid (pr, category->category_name))
|
||||||
|
category_name = PR_GetString (pr, category->category_name);
|
||||||
|
if (PR_StringValid (pr, category->class_name))
|
||||||
|
class_name = PR_GetString (pr, category->class_name);
|
||||||
|
printf (" %s (%s) @ %d\n", class_name, category_name,
|
||||||
|
POINTER_TO_PROG (pr, category));
|
||||||
|
dump_methods (pr,
|
||||||
|
&G_STRUCT (pr, pr_method_list_t, category->instance_methods),
|
||||||
|
0);
|
||||||
|
dump_methods (pr,
|
||||||
|
&G_STRUCT (pr, pr_method_list_t, category->class_methods),
|
||||||
|
1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -119,7 +134,7 @@ dump_module (progs_t *pr, pr_module_t *module)
|
||||||
symtab->cat_def_cnt);
|
symtab->cat_def_cnt);
|
||||||
for (i = 0; i < symtab->cls_def_cnt; i++)
|
for (i = 0; i < symtab->cls_def_cnt; i++)
|
||||||
dump_class (pr, &G_STRUCT (pr, pr_class_t, *ptr++));
|
dump_class (pr, &G_STRUCT (pr, pr_class_t, *ptr++));
|
||||||
for (i = 0; i < symtab->cls_def_cnt; i++)
|
for (i = 0; i < symtab->cat_def_cnt; i++)
|
||||||
dump_category (pr, &G_STRUCT (pr, pr_category_t, *ptr++));
|
dump_category (pr, &G_STRUCT (pr, pr_category_t, *ptr++));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue