diff options
author | Simon Marchi <simon.marchi@efficios.com> | 2021-11-19 22:25:23 -0500 |
---|---|---|
committer | Simon Marchi <simon.marchi@polymtl.ca> | 2022-02-06 15:48:18 -0500 |
commit | af39c5c8749757724a0f62dcb51be59cf3ecc678 (patch) | |
tree | a960f6bfd23ad6080061d29dbec58125cc33f106 /gdb/symtab.c | |
parent | 0d9acb4531cfe336b2b335fbaa1f2ef878a6e4d9 (diff) | |
download | fsf-binutils-gdb-af39c5c8749757724a0f62dcb51be59cf3ecc678.zip fsf-binutils-gdb-af39c5c8749757724a0f62dcb51be59cf3ecc678.tar.gz fsf-binutils-gdb-af39c5c8749757724a0f62dcb51be59cf3ecc678.tar.bz2 |
gdb: remove COMPUNIT_BLOCKVECTOR macro, add getter/setter
Add a getter and a setter for a compunit_symtab's blockvector. Remove
the corresponding macro and adjust all callers.
Change-Id: I99484c6619dcbbea7c5d89c72aa660316ca62f64
Diffstat (limited to 'gdb/symtab.c')
-rw-r--r-- | gdb/symtab.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/gdb/symtab.c b/gdb/symtab.c index 6626ee8..a0bc1df 100644 --- a/gdb/symtab.c +++ b/gdb/symtab.c @@ -2309,7 +2309,7 @@ lookup_symbol_in_objfile_symtabs (struct objfile *objfile, const struct block *block; struct block_symbol result; - bv = COMPUNIT_BLOCKVECTOR (cust); + bv = cust->blockvector (); block = BLOCKVECTOR_BLOCK (bv, block_index); result.symbol = block_lookup_symbol_primary (block, name, domain); result.block = block; @@ -2442,7 +2442,7 @@ lookup_symbol_via_quick_fns (struct objfile *objfile, return {}; } - bv = COMPUNIT_BLOCKVECTOR (cust); + bv = cust->blockvector (); block = BLOCKVECTOR_BLOCK (bv, block_index); result.symbol = block_lookup_symbol (block, name, symbol_name_match_type::FULL, domain); @@ -2792,7 +2792,7 @@ basic_lookup_transparent_type_quick (struct objfile *objfile, if (cust == NULL) return NULL; - bv = COMPUNIT_BLOCKVECTOR (cust); + bv = cust->blockvector (); block = BLOCKVECTOR_BLOCK (bv, block_index); sym = block_find_symbol (block, name, STRUCT_DOMAIN, block_find_non_opaque_type, NULL); @@ -2817,7 +2817,7 @@ basic_lookup_transparent_type_1 (struct objfile *objfile, for (compunit_symtab *cust : objfile->compunits ()) { - bv = COMPUNIT_BLOCKVECTOR (cust); + bv = cust->blockvector (); block = BLOCKVECTOR_BLOCK (bv, block_index); sym = block_find_symbol (block, name, STRUCT_DOMAIN, block_find_non_opaque_type, NULL); @@ -2962,7 +2962,7 @@ find_pc_sect_compunit_symtab (CORE_ADDR pc, struct obj_section *section) { for (compunit_symtab *cust : obj_file->compunits ()) { - const struct blockvector *bv = COMPUNIT_BLOCKVECTOR (cust); + const struct blockvector *bv = cust->blockvector (); const struct block *global_block = BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK); CORE_ADDR start = BLOCK_START (global_block); @@ -3068,7 +3068,7 @@ find_symbol_at_address (CORE_ADDR address) ADDR. */ auto search_symtab = [] (compunit_symtab *symtab, CORE_ADDR addr) -> symbol * { - const struct blockvector *bv = COMPUNIT_BLOCKVECTOR (symtab); + const struct blockvector *bv = symtab->blockvector (); for (int i = GLOBAL_BLOCK; i <= STATIC_BLOCK; ++i) { @@ -3276,7 +3276,7 @@ find_pc_sect_line (CORE_ADDR pc, struct obj_section *section, int notcurrent) return val; } - bv = COMPUNIT_BLOCKVECTOR (cust); + bv = cust->blockvector (); /* Look at all the symtabs that share this blockvector. They all have the same apriori range, that we found was right; @@ -4793,7 +4793,7 @@ global_symbol_searcher::add_matching_symbols /* Add matching symbols (if not already present). */ for (compunit_symtab *cust : objfile->compunits ()) { - const struct blockvector *bv = COMPUNIT_BLOCKVECTOR (cust); + const struct blockvector *bv = cust->blockvector (); for (block_enum block : { GLOBAL_BLOCK, STATIC_BLOCK }) { @@ -5773,7 +5773,7 @@ add_symtab_completions (struct compunit_symtab *cust, for (i = GLOBAL_BLOCK; i <= STATIC_BLOCK; i++) { QUIT; - b = BLOCKVECTOR_BLOCK (COMPUNIT_BLOCKVECTOR (cust), i); + b = BLOCKVECTOR_BLOCK (cust->blockvector (), i); ALL_BLOCK_SYMBOLS (b, iter, sym) { if (completion_skip_symbol (mode, sym)) |