summaryrefslogtreecommitdiff
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
commit9e1f2a750a30e29080ff621dbc93d3341380cf6c (patch)
tree3b5b36cb4eeae8b512cedf9aeb890fb77179d2e7 /binutils/objdump.c
parentbcc9f87ac5fcbcc7d2fa3d8c8cdde22f4ffe76a6 (diff)
downloadbinutils-redhat-9e1f2a750a30e29080ff621dbc93d3341380cf6c.tar.gz
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 79be66501d..0334d70dfe 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. */