* scripttempl/elf.sc: Add .note.gnu.build-id.
[deliverable/binutils-gdb.git] / gdb / dbxread.c
index f4dd4073fe75a49665fb467363eee38885b09566..bba9995a5e281843b46b9f5986f5197a532e6595 100644 (file)
@@ -1,5 +1,5 @@
 /* Read dbx symbol tables and convert to internal format, for GDB.
-   Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995,
+   Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995,
    1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004.
    Free Software Foundation, Inc.
 
@@ -17,8 +17,8 @@
 
    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., 59 Temple Place - Suite 330,
-   Boston, MA 02111-1307, USA.  */
+   Foundation, Inc., 51 Franklin Street, Fifth Floor,
+   Boston, MA 02110-1301, USA.  */
 
 /* This module provides three functions: dbx_symfile_init,
    which initializes to read a symbol file; dbx_new_init, which 
@@ -163,21 +163,21 @@ static int has_line_numbers;
 static void
 unknown_symtype_complaint (const char *arg1)
 {
-  complaint (&symfile_complaints, "unknown symbol type %s", arg1);
+  complaint (&symfile_complaints, _("unknown symbol type %s"), arg1);
 }
 
 static void
 lbrac_mismatch_complaint (int arg1)
 {
   complaint (&symfile_complaints,
-            "N_LBRAC/N_RBRAC symbol mismatch at symtab pos %d", arg1);
+            _("N_LBRAC/N_RBRAC symbol mismatch at symtab pos %d"), arg1);
 }
 
 static void
 repeated_header_complaint (const char *arg1, int arg2)
 {
   complaint (&symfile_complaints,
-            "\"repeated\" header file %s not previously seen, at symtab pos %d",
+            _("\"repeated\" header file %s not previously seen, at symtab pos %d"),
             arg1, arg2);
 }
 
@@ -966,7 +966,7 @@ set_namestring (struct objfile *objfile, struct internal_nlist nlist)
   if (((unsigned) nlist.n_strx + file_string_table_offset) >=
       DBX_STRINGTAB_SIZE (objfile))
     {
-      complaint (&symfile_complaints, "bad string table offset in symbol %d",
+      complaint (&symfile_complaints, _("bad string table offset in symbol %d"),
                 symnum);
       namestring = "<bad string table offset>";
     } 
@@ -1168,7 +1168,7 @@ static void
 function_outside_compilation_unit_complaint (const char *arg1)
 {
   complaint (&symfile_complaints,
-            "function `%s' appears to be defined outside of all compilation units",
+            _("function `%s' appears to be defined outside of all compilation units"),
             arg1);
 }
 
@@ -1564,7 +1564,7 @@ read_dbx_symtab (struct objfile *objfile)
              /* FIXME: we should not get here without a PST to work on.
                 Attempt to recover.  */
              complaint (&symfile_complaints,
-                        "N_BINCL %s not in entries for any file, at symtab pos %d",
+                        _("N_BINCL %s not in entries for any file, at symtab pos %d"),
                         namestring, symnum);
              continue;
            }
@@ -1982,7 +1982,7 @@ read_dbx_symtab (struct objfile *objfile)
               time searching to the end of every string looking for
               a backslash.  */
 
-           complaint (&symfile_complaints, "unknown symbol descriptor `%c'",
+           complaint (&symfile_complaints, _("unknown symbol descriptor `%c'"),
                       p[1]);
 
            /* Ignore it; perhaps it is an extension that we don't
@@ -2148,11 +2148,13 @@ start_psymtab (struct objfile *objfile, char *filename, CORE_ADDR textlow,
   STRING_OFFSET (result) = string_table_offset;
   FILE_STRING_OFFSET (result) = file_string_table_offset;
 
+#ifdef HAVE_ELF
   /* If we're handling an ELF file, drag some section-relocation info
      for this source file out of the ELF symbol table, to compensate for
      Sun brain death.  This replaces the section_offsets in this psymtab,
      if successful.  */
   elfstab_offset_sections (objfile, result);
+#endif
 
   /* Deduce the source language from the filename for this psymtab. */
   psymtab_language = deduce_language_from_filename (filename);
@@ -2608,8 +2610,6 @@ read_ofile_symtab (struct partial_symtab *pst)
        }
     }
 
-  current_objfile = NULL;
-
   /* In a Solaris elf file, this variable, which comes from the
      value of the N_SO symbol, will still be 0.  Luckily, text_offset,
      which comes from pst->textlow is correct. */
@@ -2625,6 +2625,8 @@ read_ofile_symtab (struct partial_symtab *pst)
   pst->symtab = end_symtab (text_offset + text_size, objfile, SECT_OFF_TEXT (objfile));
 
   end_stabs ();
+
+  current_objfile = NULL;
 }
 \f
 
@@ -2738,7 +2740,7 @@ process_one_symbol (int type, int desc, CORE_ADDR valu, char *name,
 
       /* Relocate for dynamic loading.  */
       valu += ANOFFSET (section_offsets, SECT_OFF_TEXT (objfile));
-      valu = SMASH_TEXT_ADDRESS (valu);
+      valu = gdbarch_smash_text_address (current_gdbarch, valu);
       last_function_start = valu;
 
       goto define_a_symbol;
@@ -2811,9 +2813,9 @@ process_one_symbol (int type, int desc, CORE_ADDR valu, char *name,
                 symbols within an LBRAC/RBRAC block; this complaint
                 might also help sort out problems in which
                 VARIABLES_INSIDE_BLOCK is incorrectly defined.  */
-             complaint (&symfile_complaints, "\
+             complaint (&symfile_complaints, _("\
 misplaced N_LBRAC entry; discarding local symbols which have \
-no enclosing block");
+no enclosing block"));
            }
          local_symbols = new->locals;
        }
@@ -2835,7 +2837,7 @@ no enclosing block");
              if (new->start_addr > valu)
                {
                  complaint (&symfile_complaints,
-                            "block start larger than block end");
+                            _("block start larger than block end"));
                  new->start_addr = valu;
                }
              /* Make a block for the local symbols within.  */
@@ -3025,7 +3027,7 @@ no enclosing block");
            goto case_N_ROSYM;
          default:
            internal_error (__FILE__, __LINE__,
-                           "failed internal consistency check");
+                           _("failed internal consistency check"));
          }
       }
 
@@ -3130,7 +3132,7 @@ no enclosing block");
              if (context_stack_depth > 1)
                {
                  complaint (&symfile_complaints,
-                            "unmatched N_LBRAC before symtab pos %d", symnum);
+                            _("unmatched N_LBRAC before symtab pos %d"), symnum);
                  break;
                }
 
@@ -3505,6 +3507,8 @@ static struct sym_fns aout_sym_fns =
   dbx_symfile_read,            /* sym_read: read a symbol file into symtab */
   dbx_symfile_finish,          /* sym_finish: finished with file, cleanup */
   default_symfile_offsets,     /* sym_offsets: parse user's offsets to internal form */
+  default_symfile_segments,    /* sym_segments: Get segment information from
+                                  a file.  */
   NULL                         /* next: pointer to next struct sym_fns */
 };
 
This page took 0.02663 seconds and 4 git commands to generate.