From: "Eli Zaretskii" <eliz@is.elta.co.il>
To: gdb-patches@sources.redhat.com
Subject: [RFA] Fix issues with DOSish file names in symbol tables
Date: Sat, 28 Apr 2001 01:56:00 -0000 [thread overview]
Message-ID: <1438-Sat28Apr2001115732+0300-eliz@is.elta.co.il> (raw)
The following minor changes fix GDB handling of DOS-style file and
directory names recorded in the debug info. The specific issues are:
the form of an absolute file name and the case-insensitive nature of
the underlying file system, which can leak into the debug info.
It seems like Jim Blandy and/or Elena need to approve this.
Okay to commit?
2001-04-28 Eli Zaretskii <eliz@is.elta.co.il>
* 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.
--- gdb/buildsym.c~0 Fri Dec 15 03:01:44 2000
+++ gdb/buildsym.c Sat Apr 28 11:19:40 2001
@@ -37,6 +37,7 @@
#include "expression.h" /* For "enum exp_opcode" used by... */
#include "language.h" /* For "longest_local_hex_string_custom" */
#include "bcache.h"
+#include "filenames.h" /* For DOSish file names */
/* Ask buildsym.h to define the vars it normally declares `extern'. */
#define EXTERN
/**/
@@ -531,7 +532,7 @@ start_subfile (char *name, char *dirname
for (subfile = subfiles; subfile; subfile = subfile->next)
{
- if (STREQ (subfile->name, name))
+ if (FILENAME_CMP (subfile->name, name) == 0)
{
current_subfile = subfile;
return;
--- gdb/dwarf2read.c~0 Wed Jan 24 02:22:46 2001
+++ gdb/dwarf2read.c Sat Apr 28 11:14:34 2001
@@ -35,6 +35,7 @@
#include "buildsym.h"
#include "demangle.h"
#include "expression.h"
+#include "filenames.h" /* for DOSish file names */
#include "language.h"
#include "complaints.h"
@@ -4058,14 +4059,14 @@ dwarf2_start_subfile (char *filename, ch
/* 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);
next reply other threads:[~2001-04-28 1:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-04-28 1:56 Eli Zaretskii [this message]
[not found] <15084.39992.691349.50765@kwikemart.cygnus.com>
2001-04-30 3:31 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1438-Sat28Apr2001115732+0300-eliz@is.elta.co.il \
--to=eliz@is.elta.co.il \
--cc=gdb-patches@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox