aboutsummaryrefslogtreecommitdiff
path: root/binutils/objdump.c
diff options
context:
space:
mode:
authorTristan Gingold <gingold@adacore.com>2010-01-13 11:15:52 +0000
committerTristan Gingold <gingold@adacore.com>2010-01-13 11:15:52 +0000
commitfd3a68167e6b986751558ca54fa46f4a18fb5228 (patch)
treed2fbb5e8f53d720b9a0a09894c5c009342f4f1c1 /binutils/objdump.c
parent16c06870bc4536f0ff076cb1e7d2eadac15aec85 (diff)
downloadgdb-fd3a68167e6b986751558ca54fa46f4a18fb5228.zip
gdb-fd3a68167e6b986751558ca54fa46f4a18fb5228.tar.gz
gdb-fd3a68167e6b986751558ca54fa46f4a18fb5228.tar.bz2
2010-01-13 Tristan Gingold <gingold@adacore.com>
* ar.c (main): Use lbasename. (normalize): Ditto. * objdump.c (update_source_path): Ditto.
Diffstat (limited to 'binutils/objdump.c')
-rw-r--r--binutils/objdump.c16
1 files changed, 1 insertions, 15 deletions
diff --git a/binutils/objdump.c b/binutils/objdump.c
index 79be665..0334d70 100644
--- a/binutils/objdump.c
+++ b/binutils/objdump.c
@@ -1156,21 +1156,7 @@ update_source_path (const char *filename)
return NULL;
/* Get the name of the file. */
- fname = strrchr (filename, '/');
-#ifdef HAVE_DOS_BASED_FILE_SYSTEM
- {
- /* We could have a mixed forward/back slash case. */
- char *backslash = strrchr (filename, '\\');
- if (fname == NULL || (backslash != NULL && backslash > fname))
- fname = backslash;
- if (fname == NULL && filename[0] != '\0' && filename[1] == ':')
- fname = filename + 1;
- }
-#endif
- if (fname == NULL)
- fname = filename;
- else
- ++fname;
+ fname = lbasename (filename);
/* If file exists under a new path, we need to add it to the list
so that show_line knows about it. */