X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=gdb%2Fsymfile.c;h=1a64fc797423762178dde552fff39da31a86e052;hb=13eb081a83b6f9b07cf4447e52e1d0503bf90211;hp=a660422b51e07d2e9d1828eaca6ebba78d66534a;hpb=f1f58f102ee5f3dda04853582fcb6f22cc00329b;p=binutils-gdb.git diff --git a/gdb/symfile.c b/gdb/symfile.c index a660422b51e..1a64fc79742 100644 --- a/gdb/symfile.c +++ b/gdb/symfile.c @@ -2780,7 +2780,7 @@ allocate_symtab (struct compunit_symtab *cust, const char *filename) symtab->filename = objfile->intern (filename); symtab->fullname = NULL; - symtab->language = deduce_language_from_filename (filename); + symtab->set_language (deduce_language_from_filename (filename)); /* This can be very verbose with lots of headers. Only print at higher debug levels. */ @@ -2804,19 +2804,10 @@ allocate_symtab (struct compunit_symtab *cust, const char *filename) } /* Add it to CUST's list of symtabs. */ - if (cust->filetabs == NULL) - { - cust->filetabs = symtab; - cust->last_filetab = symtab; - } - else - { - cust->last_filetab->next = symtab; - cust->last_filetab = symtab; - } + cust->add_filetab (symtab); /* Backlink to the containing compunit symtab. */ - symtab->compunit_symtab = cust; + symtab->set_compunit (cust); return symtab; } @@ -2840,7 +2831,7 @@ allocate_compunit_symtab (struct objfile *objfile, const char *name) saved_name = lbasename (name); cu->name = obstack_strdup (&objfile->objfile_obstack, saved_name); - COMPUNIT_DEBUGFORMAT (cu) = "unknown"; + cu->set_debugformat ("unknown"); if (symtab_create_debug) {