2011-03-23 Kai Tietz <ktietz@redhat.com>
[deliverable/binutils-gdb.git] / gdb / dbxread.c
index 8242cf84dc34f6f3ece23cfe81be42cb487cf700..51ddd9da877f2796204c73f51227ade60a3eae1a 100644 (file)
@@ -47,6 +47,7 @@
 #include "target.h"
 #include "gdbcore.h"           /* for bfd stuff */
 #include "libaout.h"           /* FIXME Secret internal BFD stuff for a.out */
+#include "filenames.h"
 #include "objfiles.h"
 #include "buildsym.h"
 #include "stabsread.h"
@@ -346,7 +347,7 @@ add_old_header_file (char *name, int instance)
   int i;
 
   for (i = 0; i < N_HEADER_FILES (current_objfile); i++)
-    if (strcmp (p[i].name, name) == 0 && instance == p[i].instance)
+    if (filename_cmp (p[i].name, name) == 0 && instance == p[i].instance)
       {
        add_this_object_header_file (i);
        return;
@@ -1465,7 +1466,7 @@ read_dbx_symtab (struct objfile *objfile)
            CORE_ADDR valu;
            static int prev_so_symnum = -10;
            static int first_so_symnum;
-           char *p;
+           const char *p;
            static char *dirname_nso;
            int prev_textlow_not_set;
 
@@ -1522,8 +1523,8 @@ read_dbx_symtab (struct objfile *objfile)
               If pst exists, is empty, and has a filename ending in '/',
               we assume the previous N_SO was a directory name.  */
 
-           p = strrchr (namestring, '/');
-           if (p && *(p + 1) == '\000')
+           p = lbasename (namestring);
+           if (p != namestring && *p == '\000')
              {
                /* Save the directory name SOs locally, then save it into
                   the psymtab when it's created below.  */
@@ -1612,13 +1613,13 @@ read_dbx_symtab (struct objfile *objfile)
               things like "break c-exp.y:435" need to work (I
               suppose the psymtab_include_list could be hashed or put
               in a binary tree, if profiling shows this is a major hog).  */
-           if (pst && strcmp (namestring, pst->filename) == 0)
+           if (pst && filename_cmp (namestring, pst->filename) == 0)
              continue;
            {
              int i;
 
              for (i = 0; i < includes_used; i++)
-               if (strcmp (namestring, psymtab_include_list[i]) == 0)
+               if (filename_cmp (namestring, psymtab_include_list[i]) == 0)
                  {
                    i = -1;
                    break;
This page took 0.024873 seconds and 4 git commands to generate.