From: Simon Marchi <simark@simark.ca>
To: Joel Brobecker <brobecker@adacore.com>
Cc: Philippe Waroquiers <philippe.waroquiers@skynet.be>,
gdb-patches@sourceware.org
Subject: Re: [RFA] Ensure deterministic result order in gdb.ada/info_auto_lang.exp
Date: Thu, 20 Dec 2018 05:50:00 -0000 [thread overview]
Message-ID: <d635531bfd45c305149b593a2f48aa46@simark.ca> (raw)
In-Reply-To: <20181220052958.GB12440@adacore.com>
On 2018-12-20 00:29, Joel Brobecker wrote:
>> > Since both paths appear already normalized in my case, the test does fails for me and your patch
>> > would fix it. I am 99% sure I am fine with your fix, I just want to make sure we are on the same
>> > page.
>> A mystery to me why paths are already normalized in your build ...
>> What compilation command do you see in the gdb.log for some_c.c ?
>
> I think it depends how you configure your build, and where you do
> your testing. That's why Simon asked you about it.
>
> Personally, I build and test out-of-tree, and this is the recommended
> way. And the second important element is the fact that I use an
> absolute
> path to the configure script:
>
> $ cd /path/to/build
> $ /path/to/src/configure [...]
> $ make
>
> When you configure GDB that way, then the testsuite framework will
> compile the C files by passing the absolute path to those C files.
> For instance on example from my gdb.log file:
>
> | Executing on host: gcc [...] -c -g [snip snip]
> /path/to/src/gdb/testsuite/gdb.base/gdb1090.c (timeout = 300)
>
> However, if you configure using a relative path to the configure
> script,
> things become different. With the same example, but configured using...
>
> $ cd /path/to/build
> $ ../src/configure [...]
>
> ... the path given by the testsuite frame to GCC in order to compile
> C files now includes these relative directory adjustments you are
> seeing. Eg:
>
> | Executing on host: gcc [...] -c -g [...]
> /path/to/bld/gdb/testsuite/../../../../act/gdb-public/gdb/testsuite/gdb.base/gdb1090.c
> (timeout = 300)
>
> Whether it must be this way or not and why, I don't know. But I don't
> think it's even worth exploring the idea of changing it.
Then, I think it makes sense to normalize the paths in order to have a
predictable output, regardless of how gdb was configured, as Philippe
suggested. Are you also ok with his patch?
Simon
next prev parent reply other threads:[~2018-12-20 5:50 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-01 13:38 Philippe Waroquiers
2018-12-18 20:32 ` PING " Philippe Waroquiers
2018-12-19 4:31 ` Simon Marchi
2018-12-19 21:36 ` Philippe Waroquiers
2018-12-20 5:31 ` Joel Brobecker
2018-12-20 5:50 ` Simon Marchi [this message]
2018-12-20 6:12 ` Philippe Waroquiers
2018-12-20 7:57 ` Joel Brobecker
2018-12-20 21:14 ` Philippe Waroquiers
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=d635531bfd45c305149b593a2f48aa46@simark.ca \
--to=simark@simark.ca \
--cc=brobecker@adacore.com \
--cc=gdb-patches@sourceware.org \
--cc=philippe.waroquiers@skynet.be \
/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