diff options
Diffstat (limited to 'gdb/jv-lang.c')
-rw-r--r-- | gdb/jv-lang.c | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/gdb/jv-lang.c b/gdb/jv-lang.c index 76a2124..acc191a 100644 --- a/gdb/jv-lang.c +++ b/gdb/jv-lang.c @@ -45,7 +45,7 @@ extern void _initialize_java_language (void); static int java_demangled_signature_length (const char *); static void java_demangled_signature_copy (char *, const char *); -static struct symtab *get_java_class_symtab (struct gdbarch *gdbarch); +static struct compunit_symtab *get_java_class_symtab (struct gdbarch *gdbarch); static char *get_java_utf8_name (struct obstack *obstack, struct value *name); static int java_class_is_primitive (struct value *clas); static struct value *java_value_string (char *ptr, int len); @@ -129,11 +129,11 @@ get_dynamics_objfile (struct gdbarch *gdbarch) return dynamics_objfile; } -static struct symtab * +static struct compunit_symtab * get_java_class_symtab (struct gdbarch *gdbarch) { struct objfile *objfile = get_dynamics_objfile (gdbarch); - struct symtab *class_symtab = objfile->symtabs; + struct compunit_symtab *class_symtab = objfile->compunit_symtabs; if (class_symtab == NULL) { @@ -141,13 +141,16 @@ get_java_class_symtab (struct gdbarch *gdbarch) struct block *bl; struct jv_per_objfile_data *jv_data; - class_symtab = allocate_symtab ("<java-classes>", objfile); - class_symtab->language = language_java; + class_symtab = allocate_compunit_symtab (objfile, "<java-classes>"); + add_compunit_symtab_to_objfile (class_symtab); + allocate_symtab (class_symtab, "<java-classes>"); + + COMPUNIT_FILETABS (class_symtab)->language = language_java; bv = (struct blockvector *) obstack_alloc (&objfile->objfile_obstack, sizeof (struct blockvector) + sizeof (struct block *)); BLOCKVECTOR_NBLOCKS (bv) = 1; - SYMTAB_BLOCKVECTOR (class_symtab) = bv; + COMPUNIT_BLOCKVECTOR (class_symtab) = bv; /* Allocate dummy STATIC_BLOCK. */ bl = allocate_block (&objfile->objfile_obstack); @@ -158,7 +161,7 @@ get_java_class_symtab (struct gdbarch *gdbarch) /* Allocate GLOBAL_BLOCK. */ bl = allocate_global_block (&objfile->objfile_obstack); BLOCK_DICT (bl) = dict_create_hashed_expandable (); - set_block_symtab (bl, class_symtab); + set_block_compunit_symtab (bl, class_symtab); BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK) = bl; /* Arrange to free the dict. */ @@ -171,9 +174,9 @@ get_java_class_symtab (struct gdbarch *gdbarch) static void add_class_symtab_symbol (struct symbol *sym) { - struct symtab *symtab + struct compunit_symtab *cust = get_java_class_symtab (get_objfile_arch (SYMBOL_OBJFILE (sym))); - const struct blockvector *bv = SYMTAB_BLOCKVECTOR (symtab); + const struct blockvector *bv = COMPUNIT_BLOCKVECTOR (cust); dict_add_symbol (BLOCK_DICT (BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK)), sym); } |