Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Andrew Burgess <andrew.burgess@embecosm.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: mgulick@mathworks.com, gdb-patches@sourceware.org
Subject: Re: [RFC] Apply compilation dir to source_path lookup
Date: Fri, 13 Sep 2019 22:45:00 -0000	[thread overview]
Message-ID: <20190913224535.GX6076@embecosm.com> (raw)
In-Reply-To: <834l1g1wp7.fsf@gnu.org>

* Eli Zaretskii <eliz@gnu.org> [2019-09-13 10:28:52 +0300]:

> > Date: Fri, 13 Sep 2019 09:36:42 +0300
> > From: Eli Zaretskii <eliz@gnu.org>
> > CC: mgulick@mathworks.com, gdb-patches@sourceware.org
> > 
> > >                         @value{GDBN} will also append the compilation
> > > +directory to the filename and check this against all other entries in
> > > +the source path.
> > 
> > I think "append" here is a mistake.  Should it be "prepend"?  And
> > anyway, doesn't this simply repeat what was described in the text
> > above?
> 
> Btw, do the "prepend" and "append", as implemented, take care to DTRT
> with Windows drive letters at the beginning of absolute file names?  A
> literal prepending or appending will do the wrong thing there.

Gah!

Looking at the implementation of 'openp' (in source.c) I see this
code:

  /* For dos paths, d:/foo -> /foo, and d:foo -> foo.  */
  if (HAS_DRIVE_SPEC (string))
    string = STRIP_DRIVE_SPEC (string);

which just seems to throw out the drive spec, and I can't find any
code that adds it back in.  Is that going to do the right thing?

I did consider only creating the COMP_DIR/FILENAME combination if
FILENAME was not absolute, but I worried that this might be
unnecessarily restrictive, but now I'm tempted to say that would solve
this problem, and we should just wait until someone comes up with an
example where that is not good enough, before we figure out how to
allow it...

Thanks,
Andrew


  reply	other threads:[~2019-09-13 22:45 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-05 22:40 Mike Gulick
2019-09-07 23:51 ` Andrew Burgess
2019-09-09 22:41   ` Mike Gulick
2019-09-13  1:38     ` Andrew Burgess
2019-09-13  6:36       ` Eli Zaretskii
2019-09-13  7:28         ` Eli Zaretskii
2019-09-13 22:45           ` Andrew Burgess [this message]
2019-09-13 22:52             ` Mike Gulick
2019-09-14  7:11               ` Eli Zaretskii
2019-09-17 20:22               ` Andrew Burgess
2019-09-17 20:39                 ` Mike Gulick
2019-09-14  6:56             ` Eli Zaretskii
2019-09-14 15:28               ` Andrew Burgess
2019-09-14 15:54                 ` Eli Zaretskii
2019-09-15  2:07                   ` Mike Gulick
2019-09-15  4:01                     ` Andrew Burgess
2019-09-15 15:29                       ` Eli Zaretskii
2019-09-16 15:53                       ` Mike Gulick
2019-09-13 22:11         ` Mike Gulick
2019-09-13 22:41           ` Andrew Burgess

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=20190913224535.GX6076@embecosm.com \
    --to=andrew.burgess@embecosm.com \
    --cc=eliz@gnu.org \
    --cc=gdb-patches@sourceware.org \
    --cc=mgulick@mathworks.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