From e7710bb7ac9d095ae20a4ffc48673b3815693d42 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Sat, 21 Sep 2024 23:09:38 +0900 Subject: [PATCH] [qfcc] Give symtabs a name field It's currently just to help with debugging now that I've got more less-random symtabs floating around. --- tools/qfcc/include/symtab.h | 1 + tools/qfcc/source/glsl-block.c | 1 + 2 files changed, 2 insertions(+) diff --git a/tools/qfcc/include/symtab.h b/tools/qfcc/include/symtab.h index bc387c623..f55abaeb1 100644 --- a/tools/qfcc/include/symtab.h +++ b/tools/qfcc/include/symtab.h @@ -107,6 +107,7 @@ typedef struct symtab_s { symbol_t *(*procsymbol) (const char *name, struct symtab_s *symtab); void *procsymbol_data; void *data; + const char *name; } symtab_t; const char *symtype_str (sy_type_e type) __attribute__((const)); diff --git a/tools/qfcc/source/glsl-block.c b/tools/qfcc/source/glsl-block.c index f1d8c77cf..564649c7b 100644 --- a/tools/qfcc/source/glsl-block.c +++ b/tools/qfcc/source/glsl-block.c @@ -116,6 +116,7 @@ glsl_create_block (specifier_t spec, symbol_t *block_sym) .members = new_symtab (current_symtab, stab_struct), .space = defspace_new (ds_backed), }; + block->members->name = save_string (block_sym->name); block->members->data = block; block->space->alloc_aligned = glsl_block_alloc_loc; Hash_Add (block_tab, block);