diff options
author | Simon Marchi <simon.marchi@efficios.com> | 2022-02-06 22:54:03 -0500 |
---|---|---|
committer | Simon Marchi <simon.marchi@polymtl.ca> | 2022-04-27 22:05:03 -0400 |
commit | 63d609debba854d08a515f73d0ad8e4ef8948370 (patch) | |
tree | c5e6b2c9d4b48350c707316a48e69388524cdf66 /gdb/compile | |
parent | 6395b62847e581acc3e8fa179444b824d17b3d68 (diff) | |
download | gdb-63d609debba854d08a515f73d0ad8e4ef8948370.zip gdb-63d609debba854d08a515f73d0ad8e4ef8948370.tar.gz gdb-63d609debba854d08a515f73d0ad8e4ef8948370.tar.bz2 |
gdb: remove BLOCKVECTOR_BLOCK and BLOCKVECTOR_NBLOCKS macros
Replace with calls to blockvector::blocks, and the appropriate method
call on the returned array_view.
Change-Id: I04d1f39603e4d4c21c96822421431d9a029d8ddd
Diffstat (limited to 'gdb/compile')
-rw-r--r-- | gdb/compile/compile-object-load.c | 11 | ||||
-rw-r--r-- | gdb/compile/compile.c | 4 |
2 files changed, 7 insertions, 8 deletions
diff --git a/gdb/compile/compile-object-load.c b/gdb/compile/compile-object-load.c index 2835f2d..d393091 100644 --- a/gdb/compile/compile-object-load.c +++ b/gdb/compile/compile-object-load.c @@ -422,7 +422,7 @@ get_out_value_type (struct symbol *func_sym, struct objfile *objfile, symbol_name_match_type::SEARCH_NAME); bv = func_sym->symtab ()->compunit ()->blockvector (); - nblocks = BLOCKVECTOR_NBLOCKS (bv); + nblocks = bv->num_blocks (); gdb_ptr_type_sym = NULL; for (block_loop = 0; block_loop < nblocks; block_loop++) @@ -430,7 +430,7 @@ get_out_value_type (struct symbol *func_sym, struct objfile *objfile, struct symbol *function = NULL; const struct block *function_block; - block = BLOCKVECTOR_BLOCK (bv, block_loop); + block = bv->block (block_loop); if (block->function () != NULL) continue; gdb_val_sym = block_lookup_symbol (block, @@ -441,8 +441,8 @@ get_out_value_type (struct symbol *func_sym, struct objfile *objfile, continue; function_block = block; - while (function_block != BLOCKVECTOR_BLOCK (bv, STATIC_BLOCK) - && function_block != BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK)) + while (function_block != bv->static_block () + && function_block != bv->global_block ()) { function_block = function_block->superblock (); function = function_block->function (); @@ -450,8 +450,7 @@ get_out_value_type (struct symbol *func_sym, struct objfile *objfile, break; } if (function != NULL - && (function_block->superblock () - == BLOCKVECTOR_BLOCK (bv, STATIC_BLOCK)) + && function_block->superblock () == bv->static_block () && symbol_matches_search_name (function, func_matcher)) break; } diff --git a/gdb/compile/compile.c b/gdb/compile/compile.c index 1c3a618..2843f05 100644 --- a/gdb/compile/compile.c +++ b/gdb/compile/compile.c @@ -484,8 +484,8 @@ get_expr_block_and_pc (CORE_ADDR *pc) struct symtab_and_line cursal = get_current_source_symtab_and_line (); if (cursal.symtab) - block = BLOCKVECTOR_BLOCK (cursal.symtab->compunit ()->blockvector (), - STATIC_BLOCK); + block = cursal.symtab->compunit ()->blockvector ()->static_block (); + if (block != NULL) *pc = block->entry_pc (); } |