aboutsummaryrefslogtreecommitdiff
path: root/gdb/block.c
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@efficios.com>2022-02-06 22:54:03 -0500
committerSimon Marchi <simon.marchi@polymtl.ca>2022-04-27 22:05:03 -0400
commit63d609debba854d08a515f73d0ad8e4ef8948370 (patch)
treec5e6b2c9d4b48350c707316a48e69388524cdf66 /gdb/block.c
parent6395b62847e581acc3e8fa179444b824d17b3d68 (diff)
downloadgdb-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/block.c')
-rw-r--r--gdb/block.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/gdb/block.c b/gdb/block.c
index 2d28f9d..1c3a003 100644
--- a/gdb/block.c
+++ b/gdb/block.c
@@ -147,14 +147,14 @@ find_block_in_blockvector (const struct blockvector *bl, CORE_ADDR pc)
They both have the same START,END values.
Historically this code would choose STATIC_BLOCK over GLOBAL_BLOCK but the
fact that this choice was made was subtle, now we make it explicit. */
- gdb_assert (BLOCKVECTOR_NBLOCKS (bl) >= 2);
+ gdb_assert (bl->blocks ().size () >= 2);
bot = STATIC_BLOCK;
- top = BLOCKVECTOR_NBLOCKS (bl);
+ top = bl->blocks ().size ();
while (top - bot > 1)
{
half = (top - bot + 1) >> 1;
- b = BLOCKVECTOR_BLOCK (bl, bot + half);
+ b = bl->block (bot + half);
if (b->start () <= pc)
bot += half;
else
@@ -165,7 +165,7 @@ find_block_in_blockvector (const struct blockvector *bl, CORE_ADDR pc)
while (bot >= STATIC_BLOCK)
{
- b = BLOCKVECTOR_BLOCK (bl, bot);
+ b = bl->block (bot);
if (!(b->start () <= pc))
return NULL;
if (b->end () > pc)
@@ -543,8 +543,7 @@ block_iterator_step (struct block_iterator *iterator, int first)
if (cust == NULL)
return NULL;
- block = BLOCKVECTOR_BLOCK (cust->blockvector (),
- iterator->which);
+ block = cust->blockvector ()->block (iterator->which);
sym = mdict_iterator_first (block->multidict (),
&iterator->mdict_iter);
}
@@ -612,8 +611,7 @@ block_iter_match_step (struct block_iterator *iterator,
if (cust == NULL)
return NULL;
- block = BLOCKVECTOR_BLOCK (cust->blockvector (),
- iterator->which);
+ block = cust->blockvector ()->block (iterator->which);
sym = mdict_iter_match_first (block->multidict (), name,
&iterator->mdict_iter);
}