aboutsummaryrefslogtreecommitdiff
path: root/gdb/ctfread.c
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@efficios.com>2022-01-27 21:50:32 -0500
committerSimon Marchi <simon.marchi@efficios.com>2022-02-06 16:03:46 -0500
commit6c9c307c67043b55a209af402246404d89f992c9 (patch)
tree20a8edd6e245153957a63a702f8f2eef122867c6 /gdb/ctfread.c
parent66d7f48f8045adf266046df7ceb84161d5678cfa (diff)
downloadgdb-6c9c307c67043b55a209af402246404d89f992c9.zip
gdb-6c9c307c67043b55a209af402246404d89f992c9.tar.gz
gdb-6c9c307c67043b55a209af402246404d89f992c9.tar.bz2
gdb: remove SYMBOL_DOMAIN macro
Add a getter and a setter for a symbol's domain. Remove the corresponding macro and adjust all callers. Change-Id: I54465b50ac89739c663859a726aef8cdc6e4b8f3
Diffstat (limited to 'gdb/ctfread.c')
-rw-r--r--gdb/ctfread.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/gdb/ctfread.c b/gdb/ctfread.c
index dbafe75..2f8c039 100644
--- a/gdb/ctfread.c
+++ b/gdb/ctfread.c
@@ -451,7 +451,7 @@ ctf_add_enum_member_cb (const char *name, int enum_value, void *arg)
sym->set_language (language_c, &ccp->of->objfile_obstack);
sym->compute_and_set_names (name, false, ccp->of->per_bfd);
sym->set_aclass_index (LOC_CONST);
- SYMBOL_DOMAIN (sym) = VAR_DOMAIN;
+ sym->set_domain (VAR_DOMAIN);
SYMBOL_TYPE (sym) = fip->ptype;
add_symbol_to_list (sym, ccp->builder->get_global_symbols ());
}
@@ -479,7 +479,7 @@ new_symbol (struct ctf_context *ccp, struct type *type, ctf_id_t tid)
sym->set_language (language_c, &objfile->objfile_obstack);
sym->compute_and_set_names (name, false, objfile->per_bfd);
- SYMBOL_DOMAIN (sym) = VAR_DOMAIN;
+ sym->set_domain (VAR_DOMAIN);
sym->set_aclass_index (LOC_OPTIMIZED_OUT);
if (type != nullptr)
@@ -492,7 +492,7 @@ new_symbol (struct ctf_context *ccp, struct type *type, ctf_id_t tid)
case CTF_K_UNION:
case CTF_K_ENUM:
sym->set_aclass_index (LOC_TYPEDEF);
- SYMBOL_DOMAIN (sym) = STRUCT_DOMAIN;
+ sym->set_domain (STRUCT_DOMAIN);
break;
case CTF_K_FUNCTION:
sym->set_aclass_index (LOC_STATIC);
@@ -506,7 +506,7 @@ new_symbol (struct ctf_context *ccp, struct type *type, ctf_id_t tid)
case CTF_K_INTEGER:
case CTF_K_FLOAT:
sym->set_aclass_index (LOC_TYPEDEF);
- SYMBOL_DOMAIN (sym) = VAR_DOMAIN;
+ sym->set_domain (VAR_DOMAIN);
break;
case CTF_K_POINTER:
break;
@@ -1170,7 +1170,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;
- SYMBOL_DOMAIN (sym) = VAR_DOMAIN;
+ sym->set_domain (VAR_DOMAIN);
sym->set_aclass_index (LOC_OPTIMIZED_OUT);
sym->compute_and_set_names (name, false, ccp->of->per_bfd);
add_symbol_to_list (sym, ccp->builder->get_file_symbols ());
@@ -1206,7 +1206,7 @@ add_stt_entries (struct ctf_context *ccp, int functions)
sym = new (&ccp->of->objfile_obstack) symbol;
OBJSTAT (ccp->of, n_syms++);
SYMBOL_TYPE (sym) = type;
- SYMBOL_DOMAIN (sym) = VAR_DOMAIN;
+ sym->set_domain (VAR_DOMAIN);
sym->set_aclass_index (LOC_STATIC);
sym->compute_and_set_names (tname, false, ccp->of->per_bfd);
add_symbol_to_list (sym, ccp->builder->get_global_symbols ());