* symfile.h (struct sym_fns): Add new field sym_read_linetable.
[deliverable/binutils-gdb.git] / gdb / xcoffread.c
index 8c8208ef51be3ab049c3fa176a5a78ab63f927ea..49bf023679a2923b2906fc078183aaee81d648d1 100644 (file)
@@ -9,7 +9,7 @@
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
+   the Free Software Foundation; either version 3 of the License, or
    (at your option) any later version.
 
    This program is distributed in the hope that it will be useful,
@@ -18,9 +18,7 @@
    GNU General Public License for more details.
 
    You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 51 Franklin Street, Fifth Floor,
-   Boston, MA 02110-1301, USA.  */
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "defs.h"
 #include "bfd.h"
@@ -729,7 +727,7 @@ return_after_cleanup:
   memset (&main_subfile, '\0', sizeof (struct subfile));
 }
 
-void
+static void
 aix_process_linenos (void)
 {
   /* process line numbers and enter them into line vector */
@@ -1432,9 +1430,6 @@ read_xcoff_symtab (struct partial_symtab *pst)
   (ALLOCED) ? (NAME) : obsavestring ((NAME), strlen (NAME), &objfile->objfile_obstack);
 
 
-static struct type *func_symbol_type;
-static struct type *var_symbol_type;
-
 /* process one xcoff symbol. */
 
 static struct symbol *
@@ -1479,7 +1474,7 @@ process_xcoff_symbol (struct coff_symbol *cs, struct objfile *objfile)
          patch_block_stabs (), unless the file was compiled without -g.  */
 
       DEPRECATED_SYMBOL_NAME (sym) = SYMNAME_ALLOC (name, symname_alloced);
-      SYMBOL_TYPE (sym) = func_symbol_type;
+      SYMBOL_TYPE (sym) = builtin_type (current_gdbarch)->nodebug_text_symbol;
 
       SYMBOL_CLASS (sym) = LOC_BLOCK;
       SYMBOL_DUP (sym, sym2);
@@ -1492,7 +1487,7 @@ process_xcoff_symbol (struct coff_symbol *cs, struct objfile *objfile)
   else
     {
       /* In case we can't figure out the type, provide default. */
-      SYMBOL_TYPE (sym) = var_symbol_type;
+      SYMBOL_TYPE (sym) = builtin_type (current_gdbarch)->nodebug_data_symbol;
 
       switch (cs->c_sclass)
        {
@@ -3015,6 +3010,9 @@ static struct sym_fns xcoff_sym_fns =
   xcoff_initial_scan,          /* sym_read: read a symbol file into symtab */
   xcoff_symfile_finish,                /* sym_finish: finished with file, cleanup */
   xcoff_symfile_offsets,       /* sym_offsets: xlate offsets ext->int form */
+  default_symfile_segments,    /* sym_segments: Get segment information from
+                                  a file.  */
+  aix_process_linenos,          /* sym_read_linetable */
   NULL                         /* next: pointer to next struct sym_fns */
 };
 
@@ -3022,12 +3020,4 @@ void
 _initialize_xcoffread (void)
 {
   add_symtab_fns (&xcoff_sym_fns);
-
-  func_symbol_type = init_type (TYPE_CODE_FUNC, 1, 0,
-                               "<function, no debug info>", NULL);
-  TYPE_TARGET_TYPE (func_symbol_type) = builtin_type_int;
-  var_symbol_type =
-    init_type (TYPE_CODE_INT, 
-              gdbarch_int_bit (current_gdbarch) / HOST_CHAR_BIT, 0,
-              "<variable, no debug info>", NULL);
 }
This page took 0.048934 seconds and 4 git commands to generate.