aboutsummaryrefslogtreecommitdiff
path: root/gdb/symtab.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/symtab.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/symtab.c')
-rw-r--r--gdb/symtab.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/gdb/symtab.c b/gdb/symtab.c
index 9357b5b..5e4a461 100644
--- a/gdb/symtab.c
+++ b/gdb/symtab.c
@@ -1229,7 +1229,7 @@ eq_symbol_entry (const struct symbol_cache_slot *slot,
else
{
slot_name = slot->value.found.symbol->search_name ();
- slot_domain = SYMBOL_DOMAIN (slot->value.found.symbol);
+ slot_domain = slot->value.found.symbol->domain ();
}
/* NULL names match. */
@@ -1582,7 +1582,7 @@ symbol_cache_dump (const struct symbol_cache *cache)
printf_filtered (" [%4u] = %s, %s %s\n", i,
host_address_to_string (context),
found->print_name (),
- domain_name (SYMBOL_DOMAIN (found)));
+ domain_name (found->domain ()));
break;
}
}
@@ -2329,7 +2329,7 @@ lookup_symbol_in_objfile_symtabs (struct objfile *objfile,
break;
}
if (symbol_matches_domain (result.symbol->language (),
- SYMBOL_DOMAIN (result.symbol), domain))
+ result.symbol->domain (), domain))
{
struct symbol *better
= better_symbol (other.symbol, result.symbol, domain);
@@ -2906,7 +2906,7 @@ iterate_over_symbols (const struct block *block,
ALL_BLOCK_SYMBOLS_WITH_NAME (block, name, iter, sym)
{
- if (symbol_matches_domain (sym->language (), SYMBOL_DOMAIN (sym), domain))
+ if (symbol_matches_domain (sym->language (), sym->domain (), domain))
{
struct block_symbol block_sym = {sym, block};
@@ -4847,9 +4847,9 @@ global_symbol_searcher::add_matching_symbols
sym)))
|| (kind == TYPES_DOMAIN
&& sym->aclass () == LOC_TYPEDEF
- && SYMBOL_DOMAIN (sym) != MODULE_DOMAIN)
+ && sym->domain () != MODULE_DOMAIN)
|| (kind == MODULES_DOMAIN
- && SYMBOL_DOMAIN (sym) == MODULE_DOMAIN
+ && sym->domain () == MODULE_DOMAIN
&& SYMBOL_LINE (sym) != 0))))
{
if (result_set->size () < m_max_search_results)
@@ -5030,7 +5030,7 @@ symbol_to_info_string (struct symbol *sym, int block,
/* Typedef that is not a C++ class. */
if (kind == TYPES_DOMAIN
- && SYMBOL_DOMAIN (sym) != STRUCT_DOMAIN)
+ && sym->domain () != STRUCT_DOMAIN)
{
string_file tmp_stream;
@@ -5051,7 +5051,7 @@ symbol_to_info_string (struct symbol *sym, int block,
/* variable, func, or typedef-that-is-c++-class. */
else if (kind < TYPES_DOMAIN
|| (kind == TYPES_DOMAIN
- && SYMBOL_DOMAIN (sym) == STRUCT_DOMAIN))
+ && sym->domain () == STRUCT_DOMAIN))
{
string_file tmp_stream;
@@ -5525,7 +5525,7 @@ completion_list_add_symbol (completion_tracker &tracker,
the msymbol name and removes the msymbol name from the completion
tracker. */
if (sym->language () == language_cplus
- && SYMBOL_DOMAIN (sym) == VAR_DOMAIN
+ && sym->domain () == VAR_DOMAIN
&& sym->aclass () == LOC_BLOCK)
{
/* The call to canonicalize returns the empty string if the input
@@ -5788,7 +5788,7 @@ add_symtab_completions (struct compunit_symtab *cust,
continue;
if (code == TYPE_CODE_UNDEF
- || (SYMBOL_DOMAIN (sym) == STRUCT_DOMAIN
+ || (sym->domain () == STRUCT_DOMAIN
&& SYMBOL_TYPE (sym)->code () == code))
completion_list_add_symbol (tracker, sym,
lookup_name,
@@ -5941,7 +5941,7 @@ default_collect_symbol_completion_matches_break_on
completion_list_add_fields (tracker, sym, lookup_name,
sym_text, word);
}
- else if (SYMBOL_DOMAIN (sym) == STRUCT_DOMAIN
+ else if (sym->domain () == STRUCT_DOMAIN
&& SYMBOL_TYPE (sym)->code () == code)
completion_list_add_symbol (tracker, sym, lookup_name,
sym_text, word);