mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-08-06 06:45:56 +08:00
* symtab.c (lookup_symtab_1): Use lbasename (NAME) instead of
basename (NAME). The FreeBSD basename returns a pointer to a static buffer, even if it's simply returning a string identical to its argument. (lookup_partial_symtab): Likewise.
This commit is contained in:
@ -154,7 +154,7 @@ got_symtab:
|
||||
|
||||
/* Now, search for a matching tail (only if name doesn't have any dirs) */
|
||||
|
||||
if (basename (name) == name)
|
||||
if (lbasename (name) == name)
|
||||
ALL_SYMTABS (objfile, s)
|
||||
{
|
||||
if (FILENAME_CMP (basename (s->filename), name) == 0)
|
||||
@ -244,7 +244,7 @@ lookup_partial_symtab (char *name)
|
||||
|
||||
/* Now, search for a matching tail (only if name doesn't have any dirs) */
|
||||
|
||||
if (basename (name) == name)
|
||||
if (lbasename (name) == name)
|
||||
ALL_PSYMTABS (objfile, pst)
|
||||
{
|
||||
if (FILENAME_CMP (basename (pst->filename), name) == 0)
|
||||
|
Reference in New Issue
Block a user