This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH OBV] Overwrite ${board}_file in local-remote-host
- From: Doug Evans <xdje42 at gmail dot com>
- To: Yao Qi <yao at codesourcery dot com>
- Cc: Pedro Alves <palves at redhat dot com>, "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Wed, 14 May 2014 08:24:34 -0700
- Subject: Re: [PATCH OBV] Overwrite ${board}_file in local-remote-host
- Authentication-results: sourceware.org; auth=none
- References: <1399965128-5603-1-git-send-email-yao at codesourcery dot com> <53726233 dot 4040301 at redhat dot com> <53732218 dot 20705 at codesourcery dot com>
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.