From: Mike Gulick <mgulick@mathworks.com>
To: Eli Zaretskii <eliz@gnu.org>,
Andrew Burgess <andrew.burgess@embecosm.com>
Cc: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: Re: [RFC] Apply compilation dir to source_path lookup
Date: Sun, 15 Sep 2019 02:07:00 -0000 [thread overview]
Message-ID: <d15affff-2207-57ad-4556-73ad9c15bdd2@mathworks.com> (raw)
In-Reply-To: <83tv9eyiu0.fsf@gnu.org>
On 9/14/19 11:54 AM, Eli Zaretskii wrote:
>> Date: Sat, 14 Sep 2019 11:28:47 -0400
>> From: Andrew Burgess <andrew.burgess@embecosm.com>
>> Cc: mgulick@mathworks.com, gdb-patches@sourceware.org
>>
>> If we have:
>>
>> DW_AT_name: c:/project/foo.c
>> DW_AT_comp_dir: d:/project/build/
>>
>> And if the directory search path is:
>>
>> g:/mnt/project;$cdir;$cwd
>>
>> And the current directory is:
>>
>> h:/home/
>>
>> Then this is what I think the search order will be:
>>
>> c:/project/foo.c
>> g:/mnt/project/project/foo.c
>> d:/project/build/project/foo.c
>> h:/home/project/foo.c
>>
>> d:/project/build/project/foo.c
>> g:/mnt/project/project/build/project/foo.c
>> d:/project/build/project/build/project/foo.c
>> h:/home/project/build/project/foo.c
>>
>> g:/mnt/project/foo.c
>> d:/project/build/foo.c
>> h:/home/foo.c
>>
>> The first and third block is what we currently (pre-patch) do, and the
>> second block is what I think the patch should provide after Mike's
>> last suggested update.
>
> SGTM, thanks.
>
Thanks Andrew and Eli for the clarification on the proper behavior on
DOS paths. The only remaining questionable case for me is whether to
check $cdir/COMP_DIR/FILENAME, which in your example above is
'd:/project/build/project/build/project/foo.c'. It seems reasonable
to me to leave this out of the search, although one could argue
leaving it on the source path may make the documentation slightly more
straightforward (one less special case).
Please let me know if you would like me to provide an updated version
of the patch.
Thanks,
Mike
next prev parent reply other threads:[~2019-09-15 2:07 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
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 [this message]
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=d15affff-2207-57ad-4556-73ad9c15bdd2@mathworks.com \
--to=mgulick@mathworks.com \
--cc=andrew.burgess@embecosm.com \
--cc=eliz@gnu.org \
--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