summaryrefslogtreecommitdiff
path: root/gdb/jit.c
diff options
context:
space:
mode:
authorKeith Seitz <keiths@redhat.com>2019-01-10 13:57:08 -0800
committerKeith Seitz <keiths@redhat.com>2019-01-10 13:57:08 -0800
commitb026f59345a336cabf74719fce9f96cab7c7ab4d (patch)
tree206e3e42bdc820ddd089ef01bcefb4b73a936460 /gdb/jit.c
parentc7748ee9ceb5a394658cd07aeb0445924599e442 (diff)
downloadbinutils-gdb-b026f59345a336cabf74719fce9f96cab7c7ab4d.tar.gz
gdb/23712: Use new multidictionary API
This patch builds on the previous by enabling the `new' multidictionary API. A lot of the hunks are simply textual replacements of "dict_" with "mdict_" and similar transformations. A word of warning, even with the use of multidictionaries, the code still does not satisfactorily fix the reported problems with gdb/23712 (or gdb/23010). We still have additional changes to make before that happens. gdb/ChangeLog: PR gdb/23712 PR symtab/23010 * dictionary.h (struct dictionary): Replace declaration with multidictionary. (dict_create_hashed, dict_create_hashed_expandable) (dict_create_linear, dict_create_linear_expandable) (dict_free, dict_add_symbol, dict_add_pending, dict_empty) (dict_iterator_first, dict_iterator_next, dict_iter_match_first) (dict_iter_match_next, dict_size): Rename to "mdict_" versions taking multidictionary argument. [ALL_DICT_SYMBOLS]: Update for multidictionary. * block.h (struct block) <dict>: Change to multidictionary and rename `multidict'. * block.c, buildsym.c, jit.c, mdebugread.c, objfiles.c, symmisc.c: Update all dictionary references to multidictionary.
Diffstat (limited to 'gdb/jit.c')
-rw-r--r--gdb/jit.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/gdb/jit.c b/gdb/jit.c
index 8b7f715824c..35e44e34269 100644
--- a/gdb/jit.c
+++ b/gdb/jit.c
@@ -651,14 +651,12 @@ finalize_symtab (struct gdb_symtab *stab, struct objfile *objfile)
size_t blockvector_size;
CORE_ADDR begin, end;
struct blockvector *bv;
- enum language language;
actual_nblocks = FIRST_LOCAL_BLOCK + stab->nblocks;
cust = allocate_compunit_symtab (objfile, stab->file_name);
allocate_symtab (cust, stab->file_name);
add_compunit_symtab_to_objfile (cust);
- language = compunit_language (cust);
/* JIT compilers compile in memory. */
COMPUNIT_DIRNAME (cust) = NULL;
@@ -702,8 +700,8 @@ finalize_symtab (struct gdb_symtab *stab, struct objfile *objfile)
TARGET_CHAR_BIT,
"void");
- BLOCK_DICT (new_block) = dict_create_linear (&objfile->objfile_obstack,
- language, NULL);
+ BLOCK_MULTIDICT (new_block)
+ = mdict_create_linear (&objfile->objfile_obstack, NULL);
/* The address range. */
BLOCK_START (new_block) = (CORE_ADDR) gdb_block_iter->begin;
BLOCK_END (new_block) = (CORE_ADDR) gdb_block_iter->end;
@@ -740,8 +738,8 @@ finalize_symtab (struct gdb_symtab *stab, struct objfile *objfile)
new_block = (i == GLOBAL_BLOCK
? allocate_global_block (&objfile->objfile_obstack)
: allocate_block (&objfile->objfile_obstack));
- BLOCK_DICT (new_block) = dict_create_linear (&objfile->objfile_obstack,
- language, NULL);
+ BLOCK_MULTIDICT (new_block)
+ = mdict_create_linear (&objfile->objfile_obstack, NULL);
BLOCK_SUPERBLOCK (new_block) = block_iter;
block_iter = new_block;