diff options
author | Simon Marchi <simon.marchi@efficios.com> | 2022-01-27 22:16:41 -0500 |
---|---|---|
committer | Simon Marchi <simon.marchi@efficios.com> | 2022-02-06 16:03:47 -0500 |
commit | 5f9c5a63ce38b103f778f54394c6a3d43b7ade90 (patch) | |
tree | c356fc03c61b9e9234aa8e187fb6c2303b8e5d2c /gdb/ctfread.c | |
parent | f5abd8f234426bbe8ccd08c43e6ae7cbe635e042 (diff) | |
download | gdb-5f9c5a63ce38b103f778f54394c6a3d43b7ade90.zip gdb-5f9c5a63ce38b103f778f54394c6a3d43b7ade90.tar.gz gdb-5f9c5a63ce38b103f778f54394c6a3d43b7ade90.tar.bz2 |
gdb: remove SYMBOL_TYPE macro
Add a getter and a setter for a symbol's type. Remove the corresponding
macro and adjust all callers.
Change-Id: Ie1a137744c5bfe1df4d4f9ae5541c5299577c8de
Diffstat (limited to 'gdb/ctfread.c')
-rw-r--r-- | gdb/ctfread.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/gdb/ctfread.c b/gdb/ctfread.c index 2f8c039..5d965bb 100644 --- a/gdb/ctfread.c +++ b/gdb/ctfread.c @@ -452,7 +452,7 @@ ctf_add_enum_member_cb (const char *name, int enum_value, void *arg) sym->compute_and_set_names (name, false, ccp->of->per_bfd); sym->set_aclass_index (LOC_CONST); sym->set_domain (VAR_DOMAIN); - SYMBOL_TYPE (sym) = fip->ptype; + sym->set_type (fip->ptype); add_symbol_to_list (sym, ccp->builder->get_global_symbols ()); } @@ -483,7 +483,7 @@ new_symbol (struct ctf_context *ccp, struct type *type, ctf_id_t tid) sym->set_aclass_index (LOC_OPTIMIZED_OUT); if (type != nullptr) - SYMBOL_TYPE (sym) = type; + sym->set_type (type); uint32_t kind = ctf_type_kind (fp, tid); switch (kind) @@ -499,8 +499,8 @@ new_symbol (struct ctf_context *ccp, struct type *type, ctf_id_t tid) set_symbol_address (objfile, sym, sym->linkage_name ()); break; case CTF_K_CONST: - if (SYMBOL_TYPE (sym)->code () == TYPE_CODE_VOID) - SYMBOL_TYPE (sym) = objfile_type (objfile)->builtin_int; + if (sym->type ()->code () == TYPE_CODE_VOID) + sym->set_type (objfile_type (objfile)->builtin_int); break; case CTF_K_TYPEDEF: case CTF_K_INTEGER: @@ -1169,7 +1169,7 @@ ctf_add_var_cb (const char *name, ctf_id_t id, void *arg) } sym = new (&ccp->of->objfile_obstack) symbol; OBJSTAT (ccp->of, n_syms++); - SYMBOL_TYPE (sym) = type; + sym->set_type (type); sym->set_domain (VAR_DOMAIN); sym->set_aclass_index (LOC_OPTIMIZED_OUT); sym->compute_and_set_names (name, false, ccp->of->per_bfd); @@ -1205,7 +1205,7 @@ add_stt_entries (struct ctf_context *ccp, int functions) continue; sym = new (&ccp->of->objfile_obstack) symbol; OBJSTAT (ccp->of, n_syms++); - SYMBOL_TYPE (sym) = type; + sym->set_type (type); sym->set_domain (VAR_DOMAIN); sym->set_aclass_index (LOC_STATIC); sym->compute_and_set_names (tname, false, ccp->of->per_bfd); |