Re: gdbserver/ada testing broken (was: Re: [pushed] Fix gdbserver/MI testing regression)

Joel Brobecker
2016-07-05T16:36:17Z

> 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.

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.

--
Joel