aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@gnu.org>2001-05-14 18:49:54 +0000
committerMark Kettenis <kettenis@gnu.org>2001-05-14 18:49:54 +0000
commitcaadab2cfad7745956579147ce2d97254af33f1f (patch)
treed83e013b37590d3905b0d561f652a744337ff69b
parentcb0ba49e37b824e23fe9ff24f07c008e74a6a382 (diff)
downloadgdb-caadab2cfad7745956579147ce2d97254af33f1f.zip
gdb-caadab2cfad7745956579147ce2d97254af33f1f.tar.gz
gdb-caadab2cfad7745956579147ce2d97254af33f1f.tar.bz2
* 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.
-rw-r--r--gdb/ChangeLog8
-rw-r--r--gdb/symtab.c4
2 files changed, 10 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 5c88973..0fbd941 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,11 @@
+2001-05-13 Mark Kettenis <kettenis@gnu.org>
+
+ * 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.
+
2001-05-14 Michael Snyder <msnyder@redhat.com>
* solib.c, solib.h: Add comment for function no_shared_libraries.
diff --git a/gdb/symtab.c b/gdb/symtab.c
index 8eab3d2..108ace7 100644
--- a/gdb/symtab.c
+++ b/gdb/symtab.c
@@ -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)