mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-02-25 05:01:24 +00:00
[qfcc] Save caller to new_symbol* in symbol_t
I should go through and do this for all the structs (not looking forward to expr_t) as it's sometimes quite handy to know who created something.
This commit is contained in:
parent
306306fc5a
commit
b2049f496b
2 changed files with 3 additions and 0 deletions
|
@ -94,6 +94,7 @@ typedef struct symbol_s {
|
|||
ex_list_t list; ///< sy_list
|
||||
sy_xvalue_t xvalue; ///< sy_xvalue
|
||||
};
|
||||
void *return_addr;
|
||||
} symbol_t;
|
||||
|
||||
typedef enum {
|
||||
|
|
|
@ -75,6 +75,7 @@ new_symbol (const char *name)
|
|||
if (name) {
|
||||
symbol->name = save_string (name);
|
||||
}
|
||||
symbol->return_addr = __builtin_return_address (0);
|
||||
return symbol;
|
||||
}
|
||||
|
||||
|
@ -84,6 +85,7 @@ new_symbol_type (const char *name, const type_t *type)
|
|||
symbol_t *symbol;
|
||||
symbol = new_symbol (name);
|
||||
symbol->type = type;
|
||||
symbol->return_addr = __builtin_return_address (0);
|
||||
return symbol;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue