use remote-utils facilities for baud_rate
[deliverable/binutils-gdb.git] / gdb / paread.c
index f8bd4bfc5a0a0b3467e6235cc4fbfdbf0c15d3e5..1ea889105090235f6e2236069b7553c2977d5980 100644 (file)
@@ -20,18 +20,24 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
 
 #include "defs.h"
 #include "bfd.h"
+#include <time.h> /* For time_t in libbfd.h.  */
 #include "libbfd.h"
-#include "libhppa.h"
+#include "som.h"
 #include <syms.h>
 #include "symtab.h"
 #include "symfile.h"
 #include "objfiles.h"
 #include "buildsym.h"
+#include "stabsread.h"
 #include "gdb-stabs.h"
 #include "complaints.h"
 #include <string.h>
 #include "demangle.h"
 #include <sys/file.h>
+
+/* Size of n_value and n_strx fields in a stab symbol.  */
+#define BYTES_IN_WORD 4
+
 #include "aout/aout64.h"
 
 /* Various things we might complain about... */
@@ -157,7 +163,10 @@ pa_symtab_read (abfd, addr, objfile)
            }
          break;
 
+#if 0
+         /* SS_GLOBAL and SS_LOCAL are two names for the same thing (!).  */
        case SS_GLOBAL:
+#endif
        case SS_LOCAL:
          switch (bufp->symbol_type)
            {
@@ -167,19 +176,18 @@ pa_symtab_read (abfd, addr, objfile)
 
            case ST_CODE:
              symname = bufp->name.n_strx + stringtab;
+             ms_type = mst_file_text;
+             bufp->symbol_value &= ~0x3; /* clear out permission bits */
+
+           check_strange_names:
              /* GAS leaves symbols with the prefixes "LS$", "LBB$",
                 and "LBE$" in .o files after assembling.  And thus
                 they appear in the final executable.  This can
                 cause problems if these special symbols have the
-                same value as real symbols.  So ignore them.  Is this
-                meant as a feature, or is it just a GAS bug?  */
+                same value as real symbols.  So ignore them.  Also "LC$".  */
              if (*symname == 'L'
-                 && (symname[2] == '$' && symname[1] == 'S'
-                     || (symname[3] == '$' && symname[1] == 'B'
-                         && (symname[2] == 'B' || symname[2] == 'E'))))
+                 && (symname[2] == '$' || symname[3] == '$'))
                continue;
-             ms_type = mst_file_text;
-             bufp->symbol_value &= ~0x3; /* clear out permission bits */
              break;
 
            case ST_PRI_PROG:
@@ -190,13 +198,17 @@ pa_symtab_read (abfd, addr, objfile)
              ms_type = mst_file_text;
              bufp->symbol_value &= ~0x3; /* clear out permission bits */
              break;
+
            case ST_DATA:
              symname = bufp->name.n_strx + stringtab;
              ms_type = mst_file_data;
-             break;
+             goto check_strange_names;
+
            default:
              continue;
            }
+         break;
+
        default:
          continue;
        }
@@ -410,6 +422,9 @@ pa_symfile_init (objfile)
   if (!DBX_TEXT_SECT (objfile))
     error ("Can't find .text section in symbol file");
 
+  /* FIXME: I suspect this should be external_nlist.  The size of host
+     types like long and bfd_vma should not affect how we read the
+     file.  */
   DBX_SYMBOL_SIZE (objfile) = sizeof (struct internal_nlist);
   DBX_SYMCOUNT (objfile) = bfd_section_size (sym_bfd, stabsect)
     / DBX_SYMBOL_SIZE (objfile);
This page took 0.024953 seconds and 4 git commands to generate.