aboutsummaryrefslogtreecommitdiff
path: root/gdb/dwarf2read.c
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2001-04-30 10:30:27 +0000
committerEli Zaretskii <eliz@gnu.org>2001-04-30 10:30:27 +0000
commitd5166ae11e7cfb49047d2df5443306e007f820a1 (patch)
treecfd4cf938b2b27dc525ad8369920e8d39b0f842c /gdb/dwarf2read.c
parent6a2bda3fa0a885cb4d25ada3dbe56d346bd08a24 (diff)
downloadgdb-d5166ae11e7cfb49047d2df5443306e007f820a1.zip
gdb-d5166ae11e7cfb49047d2df5443306e007f820a1.tar.gz
gdb-d5166ae11e7cfb49047d2df5443306e007f820a1.tar.bz2
* buildsym.c (start_subfile): Use FILENAME_CMP instead of STREQ.
(top-level): #include filenames.h. * dwarf2read.c (dwarf2_start_subfile): Use IS_ABSOLUTE_PATH and FILENAME_CMP, to DTRT on non-Posix platforms. (top-level): #include filenames.h.
Diffstat (limited to 'gdb/dwarf2read.c')
-rw-r--r--gdb/dwarf2read.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index 9617f67..17e0701 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -36,6 +36,7 @@
#include "buildsym.h"
#include "demangle.h"
#include "expression.h"
+#include "filenames.h" /* for DOSish file names */
#include "language.h"
#include "complaints.h"
@@ -4063,14 +4064,14 @@ dwarf2_start_subfile (char *filename, char *dirname)
/* If the filename isn't absolute, try to match an existing subfile
with the full pathname. */
- if (*filename != '/' && dirname != NULL)
+ if (!IS_ABSOLUTE_PATH (filename) && dirname != NULL)
{
struct subfile *subfile;
char *fullname = concat (dirname, "/", filename, NULL);
for (subfile = subfiles; subfile; subfile = subfile->next)
{
- if (STREQ (subfile->name, fullname))
+ if (FILENAME_CMP (subfile->name, fullname) == 0)
{
current_subfile = subfile;
xfree (fullname);