Re: gdbserver/ada testing broken

Simon Marchi
2016-07-05T17:19:26Z

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