This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: gdbserver/ada testing broken
- From: Simon Marchi <simon dot marchi at ericsson dot com>
- To: Joel Brobecker <brobecker at adacore dot com>, Pedro Alves <palves at redhat dot com>
- Cc: <gdb-patches at sourceware dot org>
- Date: Tue, 5 Jul 2016 13:19:12 -0400
- Subject: Re: gdbserver/ada testing broken
- Authentication-results: sourceware.org; auth=none
- References: <1462538104-19109-1-git-send-email-palves@redhat.com> <1462538104-19109-32-git-send-email-palves@redhat.com> <5772DBCA.4090802@ericsson.com> <813555f3-c917-cd95-6d41-3ec64cad2cf6@redhat.com> <14e113dd-0488-79d0-6cde-82cdb1562793@redhat.com> <ae8c1637-25c6-c975-3319-74aa0aa1a6e5@redhat.com> <20160705163611.GJ3295@adacore.com>
On 16-07-05 12:36 PM, Joel Brobecker wrote:
>> This is probably because gdb_remote_download only minds "tail" when
>> deciding the destination filename:
>>
>> proc gdb_remote_download {dest fromfile {tofile {}}} {
>> # If TOFILE is not given, default to the same filename as FROMFILE.
>> if {[string length $tofile] == 0} {
>> set tofile [file tail $fromfile]
>> }
>
> Looks like this code is indirectly assuming that the code is in the same
> directory as the .exp. That's why it can extract the target directory
> via a simple "tail". I tried looking at whether we could make sure
> "tofile" was explicitly passed at least for Ada, but it doesn't look
> really like an option, as I think this comes from gdb_file_cmd where,
> logically, all we care about is which executable to load into GDB.
Hi Joel,
I posted this patch this morning, I should have CC'ed you:
https://sourceware.org/ml/gdb-patches/2016-07/msg00068.html
I think it solves it.
> I am running out of time to investigate this for now, but to me,
> thinking this further, I think the most promising avenue is probably
> to look at eliminating the subdirectory, since our testing procedure
> now creates one per test already. But I'm not sure how this is going
> to affect in-tree testing.
I think it will work regardless of in-tree/out-of-tree, since we always use the
same layout, under the "outputs" directory. I tested it before sending my patch
and it seemed to work fine.
Simon