diff options
author | Simon Marchi <simon.marchi@polymtl.ca> | 2022-04-06 10:42:03 -0400 |
---|---|---|
committer | Simon Marchi <simon.marchi@polymtl.ca> | 2022-04-07 13:04:53 -0400 |
commit | 44281e6c08cae11d4e116d87ea34ad391d58ae91 (patch) | |
tree | 7d79dd1cb4870a6d73026985325059b01cde89c2 /gdb/mdebugread.c | |
parent | e4730328287f755eb313c3762d83d389462cde15 (diff) | |
download | gdb-44281e6c08cae11d4e116d87ea34ad391d58ae91.zip gdb-44281e6c08cae11d4e116d87ea34ad391d58ae91.tar.gz gdb-44281e6c08cae11d4e116d87ea34ad391d58ae91.tar.bz2 |
gdb: remove symtab::blockvector
symtab::blockvector is a wrapper around compunit_symtab::blockvector.
It is a bit misleadnig, as it gives the impression that a symtab has a
blockvector. Remove it, change all users to fetch the blockvector
through the compunit instead.
Change-Id: Ibd062cd7926112a60d52899dff9224591cbdeebf
Diffstat (limited to 'gdb/mdebugread.c')
-rw-r--r-- | gdb/mdebugread.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/gdb/mdebugread.c b/gdb/mdebugread.c index eae8064..67630b7 100644 --- a/gdb/mdebugread.c +++ b/gdb/mdebugread.c @@ -628,7 +628,7 @@ parse_symbol (SYMR *sh, union aux_ext *ax, char *ext_sh, int bigend, break; case stGlobal: /* External symbol, goes into global block. */ - b = BLOCKVECTOR_BLOCK (top_stack->cur_st->blockvector (), + b = BLOCKVECTOR_BLOCK (top_stack->cur_st->compunit ()->blockvector (), GLOBAL_BLOCK); s = new_symbol (name); SET_SYMBOL_VALUE_ADDRESS (s, (CORE_ADDR) sh->value); @@ -771,7 +771,7 @@ parse_symbol (SYMR *sh, union aux_ext *ax, char *ext_sh, int bigend, if (sh->st == stProc) { const struct blockvector *bv - = top_stack->cur_st->blockvector (); + = top_stack->cur_st->compunit ()->blockvector (); /* The next test should normally be true, but provides a hook for nested functions (which we don't want to make @@ -1144,7 +1144,7 @@ parse_symbol (SYMR *sh, union aux_ext *ax, char *ext_sh, int bigend, { /* Finished with procedure */ const struct blockvector *bv - = top_stack->cur_st->blockvector (); + = top_stack->cur_st->compunit ()->blockvector (); struct mdebug_extra_func_info *e; struct block *cblock = top_stack->cur_block; struct type *ftype = top_stack->cur_type; @@ -4187,7 +4187,7 @@ mdebug_expand_psymtab (legacy_psymtab *pst, struct objfile *objfile) FIXME, Maybe quit once we have found the right number of ext's? */ top_stack->cur_st = cust->primary_filetab (); top_stack->cur_block - = BLOCKVECTOR_BLOCK (top_stack->cur_st->blockvector (), + = BLOCKVECTOR_BLOCK (top_stack->cur_st->compunit ()->blockvector (), GLOBAL_BLOCK); top_stack->blocktype = stFile; @@ -4497,13 +4497,14 @@ add_block (struct block *b, struct symtab *s) { /* Cast away "const", but that's ok because we're building the symtab and blockvector here. */ - struct blockvector *bv = (struct blockvector *) s->blockvector (); + struct blockvector *bv + = (struct blockvector *) s->compunit ()->blockvector (); bv = (struct blockvector *) xrealloc ((void *) bv, (sizeof (struct blockvector) + BLOCKVECTOR_NBLOCKS (bv) * sizeof (bv->block))); - if (bv != s->blockvector ()) + if (bv != s->compunit ()->blockvector ()) s->compunit ()->set_blockvector (bv); BLOCKVECTOR_BLOCK (bv, BLOCKVECTOR_NBLOCKS (bv)++) = b; @@ -4567,7 +4568,8 @@ sort_blocks (struct symtab *s) { /* We have to cast away const here, but this is ok because we're constructing the blockvector in this code. */ - struct blockvector *bv = (struct blockvector *) s->blockvector (); + struct blockvector *bv + = (struct blockvector *) s->compunit ()->blockvector (); if (BLOCKVECTOR_NBLOCKS (bv) <= FIRST_LOCAL_BLOCK) { |