From: Eli Zaretskii <eliz@gnu.org>
To: Doug Evans <dje@google.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [RFA] [1/2] auto-loading scripts from .debug_gdb_scripts section
Date: Fri, 16 Apr 2010 21:25:00 -0000 [thread overview]
Message-ID: <83bpdjccpc.fsf@gnu.org> (raw)
In-Reply-To: <s2ie394668d1004161106y588ea711u75759ef3751f8470@mail.gmail.com>
> Date: Fri, 16 Apr 2010 11:06:44 -0700
> From: Doug Evans <dje@google.com>
> Cc: gdb-patches@sourceware.org
>
> > The existing Python Auto-loading section is not too long, so how about
> > simply adding the description of this new feature to that section? Â I
> > think ripping it out of "Python API" is not a good idea.
>
> To me the Auto-loading section is not really part of the API.
Well, yes, but this feature is currently specific to Python, so why
move it out of the Python chapter?
> >> +If this file does not exist, and if the parameter
> >> +@code{debug-file-directory} is set (@pxref{Separate Debug Files}),
> >> +then @value{GDBN} will use for its each separated directory component
> >> +@code{component} the file named @file{@code{component}/@var{real-name}}, where
> >> +@var{real-name} is the object file's real name, as described above.
> >
> > I know you just copied this from the original text, but this is
> > confusingly complicated. Â How about this rewording:
> >
> > Â If this file does not exist, and if the parameter
> > Â @code{debug-file-directory} is set (@pxref{Separate Debug Files}),
> > Â then @value{GDBN} will look for the file in that directory and in
> > Â all of its parents.
>
> "all of its parents"?
> I *think* that comment is referring to the fact that
> "debug-file-directory" contains a colon-separated list of directories
> to try
Right you are. So
If this file does not exist, and if the parameter
@code{debug-file-directory} is set (@pxref{Separate Debug Files}),
then @value{GDBN} will look for the file in all of the directories
mentioned in the value of @code{debug-file-directory}.
> bad option name of course
A terrible name.
> >> + Â if (!input && debug_file_directory)
> >> + Â Â {
> >> + Â Â Â /* Also try the same file in the separate debug info directory. Â */
> >> + Â Â Â debugfile = xmalloc (strlen (filename)
> >> + Â Â Â Â Â Â Â Â Â Â Â Â + strlen (debug_file_directory) + 1);
> >> + Â Â Â strcpy (debugfile, debug_file_directory);
> >> + Â Â Â /* FILENAME is absolute, so we don't need a "/" here. Â */
> >> + Â Â Â strcat (debugfile, filename);
> >
> > What will that last strcat do if FILENAME has a drive letter?
> >
> >> + Â Â Â strcpy (debugfile, gdb_datadir);
> >> + Â Â Â strcat (debugfile, "/auto-load");
> >> + Â Â Â /* FILENAME is absolute, so we don't need a "/" here. Â */
> >> + Â Â Â strcat (debugfile, filename);
> >
> > Ditto.
>
> This is cut-n-pasted from the existing code to auto-load -gdb.py
> scripts. I don't know if filename can have a drive letter here.
Yes, it can. It depends how the files were called out in the
compilation command line.
I think we should strip the drive letter and the colon before
concatenating the rest with the leading directory.
next prev parent reply other threads:[~2010-04-16 21:25 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-16 7:06 Doug Evans
2010-04-16 9:38 ` Eli Zaretskii
2010-04-16 18:06 ` Doug Evans
2010-04-16 21:25 ` Eli Zaretskii [this message]
2010-04-20 21:45 ` Doug Evans
2010-04-21 19:23 ` Doug Evans
2010-04-21 20:39 ` Eli Zaretskii
2010-04-21 21:54 ` Doug Evans
2010-04-22 3:13 ` Eli Zaretskii
2010-04-23 18:10 ` Doug Evans
2010-04-20 19:13 ` Tom Tromey
2010-04-20 21:38 ` Doug Evans
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=83bpdjccpc.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=dje@google.com \
--cc=gdb-patches@sourceware.org \
/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