From: Eli Zaretskii <eliz@is.elta.co.il>
To: Alexander Larsson <alexl@redhat.com>
Cc: Elena Zannoni <ezannoni@redhat.com>,
gdb@sources.redhat.com, Jim Blandy <jimb@redhat.com>
Subject: Re: External debug symbols
Date: Wed, 25 Sep 2002 22:00:00 -0000 [thread overview]
Message-ID: <Pine.SUN.3.91.1020926064748.12918B-100000@is> (raw)
In-Reply-To: <Pine.LNX.4.44.0209250449350.27088-200000@devserv.devel.redhat.com>
On Wed, 25 Sep 2002, Alexander Larsson wrote:
> Oh, I missed a place where I should be using IS_DIR_SEPARATOR, new patch
> attached.
See a couple of comments below.
> Still, I just hardcode / when i want to add directory
> separators, but this seems to be common in gdb.
That's okay in general, since DOS/Windows filesystems support forward
slashes as well as backslashes.
+ fd = open (name, O_RDONLY);
+ if (fd < 0)
+ return 0;
This `open' call should use a binary mode (O_BINARY or'ed with O_RDONLY).
+ /* Strip off filename part */
+ for (i = strlen(dir) - 1; i >= 0; i--)
+ {
+ if (IS_DIR_SEPARATOR (dir[i]))
+ break;
+ }
+ dir[i+1] = '\0';
This will fail for file names such as "d:foo.c", but I'm not sure this
case is worth pursuing.
+ debug_file_search_path = xstrdup (DEBUGDIR);
+ c = add_set_cmd ("debug-file-search-path", class_support, var_string,
+ (char *) &debug_file_search_path,
+ "Set the search path for loading separate debug symbols.\n"
+ "Separate debug symbols are first searched for in the same\n"
+ "directory as the binary, then in the .debug subdirectory,\n"
+ "and lastly at the path of the directory of the binary with\n"
+ "the global debug-file search path prepended\n",
+ &setlist);
Isn't the use of ``search-path'' here confusing? The variable holds a
name of a single directory, not a colon-separated list of directories,
right? If so, shouldn't we call it ``debug-file-directory'' or some such?
Finally, this new feature should be documented in the manual. (Sorry if
you already posted the patch for that and I forgot.)
next prev parent reply other threads:[~2002-09-26 5:00 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-08-20 12:50 Alexander Larsson
2002-08-21 6:39 ` Alexander Larsson
2002-08-21 10:46 ` Jim Blandy
2002-08-21 23:51 ` Alexander Larsson
2002-08-27 3:59 ` Alexander Larsson
2002-09-16 6:59 ` Alexander Larsson
2002-09-20 8:13 ` Elena Zannoni
2002-09-20 8:22 ` Daniel Jacobowitz
2002-09-23 0:46 ` Alexander Larsson
2002-09-23 0:43 ` Alexander Larsson
2002-09-23 8:21 ` Alexander Larsson
2002-09-23 8:25 ` Daniel Jacobowitz
2002-09-23 10:03 ` Alexander Larsson
2002-09-23 21:45 ` Eli Zaretskii
2002-09-25 1:51 ` Alexander Larsson
2002-09-25 22:00 ` Eli Zaretskii [this message]
2002-10-02 7:42 ` Alexander Larsson
2002-10-02 21:40 ` Eli Zaretskii
2002-10-08 8:21 ` Alexander Larsson
2002-10-08 9:33 ` 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=Pine.SUN.3.91.1020926064748.12918B-100000@is \
--to=eliz@is.elta.co.il \
--cc=alexl@redhat.com \
--cc=ezannoni@redhat.com \
--cc=gdb@sources.redhat.com \
--cc=jimb@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