summaryrefslogtreecommitdiffstats
path: root/gdb/dbxread.c
diff options
context:
space:
mode:
authorKai Tietz <kai.tietz@onevision.com>2011-03-23 18:23:56 +0000
committerKai Tietz <kai.tietz@onevision.com>2011-03-23 18:23:56 +0000
commit0ba1096ad5c3a2dc64e6f30c122e7d9c205eef90 (patch)
treefb89e8879076e9ab79a2edbe16146307cb45c9e7 /gdb/dbxread.c
parent663a1470e1a7af58a3d0691f480bc5621bd0c54f (diff)
downloadppe42-binutils-0ba1096ad5c3a2dc64e6f30c122e7d9c205eef90.tar.gz
ppe42-binutils-0ba1096ad5c3a2dc64e6f30c122e7d9c205eef90.zip
2011-03-23 Kai Tietz <ktietz@redhat.com>
* breakpoint.c (clear_command): Use filename_cmp instead of strcmp for comparison. * buildsym.c (watch_main_source_file_lossage): Likewise. (patch_subfile_names): Use IS_DIR_SEPARATOR instead of checking just for slash. * dbxread.c (read_dbx_symtab): Use lbasename instead of strrchr and filename_cmp instead of strcmp for filenames. (add_old_header_file): Use filename_cmp instead of strcmp for comparison. * exec.c (exec_set_section_address): Likewise. * macrotab.c (macro_lookup_inclusion): Likewise. (macro_lookup_inclusion): Likewise. * elfread.c (_initialize_elfread): Likewise. (elfstab_offset_sections): Likewise. (elfstab_offset_sections): Use lbasename instead of strrchr. * mdebugread.c (parse_partial_symbols): Likewise. (arse_partial_symbols): Use filename_(n)cmp instead of str(n)cmp for comparison. * minsyms.c (lookup_minimal_symbol): Likewise. * psymtab.c (read_psymtabs_with_filename): Likewise. * solib.c (solib_read_symbols): Likewise. (reload_shared_libraries_1): Likewise. * symmisc.c (maintenance_print_symbols): Likewise. * symfile.c (separate_debug_file_exists): Likewise. (reread_symbols): Likewise. (find_separate_debug_file_by_debuglink): Likewise. * remote-fileio.c (remote_fileio_func_rename): Likewise. * source.c (add_path): Likewise. * symtab.c (filename_seen): Likewise. (file_matches): Likewise. (print_symbol_info): Likewise. (maybe_add_partial_symtab_filename): Likewise. (make_source_files_completion_list): Likewise. * xml-syscall.c (init_sysinfo): Likewise. * windows-nat.c (_initialize_check_for_gdb_ini): Use IS_DIR_SEPARATOR for checking for trailing path separator.
Diffstat (limited to 'gdb/dbxread.c')
-rw-r--r--gdb/dbxread.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/gdb/dbxread.c b/gdb/dbxread.c
index 8242cf84dc..51ddd9da87 100644
--- a/gdb/dbxread.c
+++ b/gdb/dbxread.c
@@ -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;
OpenPOWER on IntegriCloud