X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=gdb%2Fsymfile.c;h=1a64fc797423762178dde552fff39da31a86e052;hb=13eb081a83b6f9b07cf4447e52e1d0503bf90211;hp=315ee8ecec770c8b01ceb0a5ed2eb7541eeb98a4;hpb=d4396e0e97d21ad766089748fde1e11257384c49;p=binutils-gdb.git diff --git a/gdb/symfile.c b/gdb/symfile.c index 315ee8ecec7..1a64fc79742 100644 --- a/gdb/symfile.c +++ b/gdb/symfile.c @@ -2607,9 +2607,9 @@ reread_symbols (int from_tty) if (!objfile_has_symbols (objfile)) { - wrap_here (""); + gdb_stdout->wrap_here (0); printf_filtered (_("(no debugging symbols found)\n")); - wrap_here (""); + gdb_stdout->wrap_here (0); } /* We're done reading the symbol file; finish off complaints. */ @@ -2774,13 +2774,13 @@ deduce_language_from_filename (const char *filename) struct symtab * allocate_symtab (struct compunit_symtab *cust, const char *filename) { - struct objfile *objfile = cust->objfile; + struct objfile *objfile = cust->objfile (); struct symtab *symtab = OBSTACK_ZALLOC (&objfile->objfile_obstack, struct symtab); 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; } @@ -2832,7 +2823,7 @@ allocate_compunit_symtab (struct objfile *objfile, const char *name) struct compunit_symtab); const char *saved_name; - cu->objfile = objfile; + cu->set_objfile (objfile); /* The name we record here is only for display/debugging purposes. Just save the basename to avoid path issues (too long for display, @@ -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) { @@ -2858,8 +2849,8 @@ allocate_compunit_symtab (struct objfile *objfile, const char *name) void add_compunit_symtab_to_objfile (struct compunit_symtab *cu) { - cu->next = cu->objfile->compunit_symtabs; - cu->objfile->compunit_symtabs = cu; + cu->next = cu->objfile ()->compunit_symtabs; + cu->objfile ()->compunit_symtabs = cu; }