diff options
author | Tom Tromey <tromey@redhat.com> | 2012-05-10 19:59:12 +0000 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2012-05-10 19:59:12 +0000 |
commit | 84a146c9d3fdfcd4a45b12f88735bd77d4f8d729 (patch) | |
tree | 1af7348130cfb4bd51a0f2f3cf6955c4de6688fe /gdb/jit.c | |
parent | 9439a077bef75279f4881cabc3adbe61cf057504 (diff) | |
download | gdb-84a146c9d3fdfcd4a45b12f88735bd77d4f8d729.zip gdb-84a146c9d3fdfcd4a45b12f88735bd77d4f8d729.tar.gz gdb-84a146c9d3fdfcd4a45b12f88735bd77d4f8d729.tar.bz2 |
* jv-lang.c (get_java_class_symtab): Use allocate_global_block,
set_block_symtab.
* jit.c (finalize_symtab): Use allocate_global_block,
set_block_symtab.
* buildsym.c (finish_block_internal): New function, from old
finish_block.
(finish_block): Rewrite.
(end_symtab): Use finish_block_internal, set_block_symtab.
* block.h (struct global_block): New.
(allocate_global_block, set_block_symtab): Declare.
* block.c (allocate_global_block, set_block_symtab): New
functions.
Diffstat (limited to 'gdb/jit.c')
-rw-r--r-- | gdb/jit.c | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -695,7 +695,11 @@ finalize_symtab (struct gdb_symtab *stab, struct objfile *objfile) block_iter = NULL; for (i = 0; i < FIRST_LOCAL_BLOCK; i++) { - struct block *new_block = allocate_block (&objfile->objfile_obstack); + struct block *new_block; + + 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, NULL); BLOCK_SUPERBLOCK (new_block) = block_iter; @@ -705,6 +709,9 @@ finalize_symtab (struct gdb_symtab *stab, struct objfile *objfile) BLOCK_END (new_block) = (CORE_ADDR) end; BLOCKVECTOR_BLOCK (symtab->blockvector, i) = new_block; + + if (i == GLOBAL_BLOCK) + set_block_symtab (new_block, symtab); } /* Fill up the superblock fields for the real blocks, using the |