public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Simon Marchi <simon.marchi@ericsson.com>
To: Pedro Alves <palves@redhat.com>, <gdb-patches@sourceware.org>
Subject: Re: [PATCH v2 1/2] Improve gdb_remote_download, remove gdb_download
Date: Tue, 05 Apr 2016 17:54:00 -0000	[thread overview]
Message-ID: <5703FBD7.7020706@ericsson.com> (raw)
In-Reply-To: <5703FA26.2080907@redhat.com>

On 16-04-05 01:47 PM, Pedro Alves wrote:
> On 04/04/2016 07:30 PM, Simon Marchi wrote:
> 
>>  
>> -# Like remote_download but provides a gdb-specific behavior.  If DEST
>> -# is "host", and the host is not remote, and TOFILE is not specified,
>> -# then the [file tail] of FROMFILE is passed through
>> -# standard_output_file to compute the destination.
>> +# Like remote_download but provides a gdb-specific behavior.
>> +#
>> +# If the destination board is remote, the local file FROMFILE is transferred as
>> +# usual with remote_download to TOFILE on the reemote board.  The destination
> 
> Typo "reemote".

Fixed.

>> +# filename is added to the CLEANFILES global, so it can be cleaned up at the
>> +# end of the test.
>> +#
>> +# If the destination board is local, the destination path TOFILE is passed
>> +# through standard_output_file, and FROMFILE is copied there.
>> +#
>> +# In both cases, if TOFILE is omitted, it defaults to the [file tail] of
>> +# FROMFILE.
>>  
>>  proc gdb_remote_download {dest fromfile {tofile {}}} {
>> -    if {$dest == "host" && ![is_remote host] && $tofile == ""} {
>> -	set tofile [standard_output_file [file tail $fromfile]]
>> +    # If TOFILE is not given, default to the same filename as FROMFILE.
>> +    if {[string length $tofile] == 0} {
>> +	set tofile [file tail $fromfile]
>>      }
>>  
>> -    if { $tofile == "" } {
>> -	return [remote_download $dest $fromfile]
>> -    } else {
>> -	return [remote_download $dest $fromfile $tofile]
>> -    }
>> -}
>> +    if {[is_remote $dest]} {
>> +	# When the DEST is remote, we simply send the file to the target.
>> +	global cleanfiles
> 
> Shouldn't this be, "When the DEST is remote, we simply send the
> file to DEST" ?.

Right.

>>  
>> -# gdb_download
>> -#
>> -# Copy a file to the remote target and return its target filename.
>> -# Schedule the file to be deleted at the end of this test.
>> +	set destname [remote_download target $fromfile $tofile]
> 
> and thus here be "remote_download $dest" ?

Right.  I tested this procedure with a remote host, but with the target being
the same as the host, so it was working anyway...

Fixed.

  reply	other threads:[~2016-04-05 17:54 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-04 18:31 Simon Marchi
2016-04-04 18:31 ` [PATCH v2 2/2] Make ftrace tests work with remote targets Simon Marchi
2016-04-05 17:49   ` Pedro Alves
2016-04-05 18:04     ` Simon Marchi
2016-04-11 13:12   ` Yao Qi
2016-04-11 14:18     ` Simon Marchi
2016-04-05 17:47 ` [PATCH v2 1/2] Improve gdb_remote_download, remove gdb_download Pedro Alves
2016-04-05 17:54   ` Simon Marchi [this message]
2016-04-05 17:57     ` Pedro Alves
2016-04-05 18:03       ` Simon Marchi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5703FBD7.7020706@ericsson.com \
    --to=simon.marchi@ericsson.com \
    --cc=gdb-patches@sourceware.org \
    --cc=palves@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).