This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH OBV] Overwrite ${board}_file in local-remote-host


On Wed, May 14, 2014 at 12:58 AM, Yao Qi <yao@codesourcery.com> wrote:
> On 05/14/2014 02:19 AM, Pedro Alves wrote:
>> Thanks.  I agree it's obvious, knowing we already do that in
>> other board files.  Go ahead and push.
>
> Thanks, Pedro.  Patch is pushed in.

Hi.

There's no comments in the code explaining Why Things Are The Way They Are.
It's not obvious to me that wanting to delete a file should
necessarily always be a nop.
I can imagine writing a test where I need it to not be a nop.
[I realize gdbserver-base.exp has the same problem, and I may have even
been the one that originally put it there (this file was created to contain
some common parts of the native-*.exp files).
btw, gdbserver-base.exp needs to be renamed to native-gdbserver-base.exp,
hardwiring delete to be a nop is only for native gdbserver.]

Looking at gdb_remote_download I see gdb_download does this differently.
It appends the file to cleanfiles which is a list of files to be
deleted (on the target) when the test ends.
So now we have two different solutions to similar problems: cleaning
up after a test.
If you use gdb_remote_download you have to remember to delete it at
the end and if you use gdb_download you don't.
[I realize gdb_download is for the target only.]
Maybe we need host_cleanfiles.

I remember some tests solving this problem by giving the downloaded
file a different name.
So that's another way in which we now have two different solutions to
the same problem.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]