mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-08-06 06:45:56 +08:00
2010-01-13 Tristan Gingold <gingold@adacore.com>
* ar.c (main): Use lbasename. (normalize): Ditto. * objdump.c (update_source_path): Ditto.
This commit is contained in:
@ -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. */
|
||||
|
Reference in New Issue
Block a user