Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Yao Qi <yao@codesourcery.com>
To: Pedro Alves <palves@redhat.com>
Cc: <gdb-patches@sourceware.org>
Subject: Re: [PATCH] Another board file for remote host
Date: Fri, 29 Aug 2014 01:38:00 -0000	[thread overview]
Message-ID: <87a96of59j.fsf@codesourcery.com> (raw)
In-Reply-To: <53FF3C68.6040905@redhat.com> (Pedro Alves's message of "Thu, 28	Aug 2014 15:27:52 +0100")

Pedro Alves <palves@redhat.com> writes:

> I'm confused on the choice of "native" for name.
> local-remote-host.exp/local-remote-host-notty.exp seem just or more
> more native to me, as they assume a shared filesystem, while
> the whole point of this one is emulate the case of _not_ sharing
> the filesystem?

This board file is used to emulate the real remote host testing, in
which file system of host and build are not shared.  To be concrete,
I'd like this board file to emulate the testing we do for native
mingw32 GDB.  GDB is built on x86_64-linux, is run on Windows, and
does debugging on Windows.  I find such testing mode exposes some
problems in test cases, such as files not copied to host or referencing
build file path on host, etc.

Existing board files local-remote-host-*.exp share the file system, so
the problem of copying needed files to host is not exposed.

This board file is to emulate the testing to a native gdb (host ==
target) on a remote host (host != build), so I name it
local-remote-host-native.  At first, I name it local-remote-host-target,
but I discard it as it is confusing.

>
>> +# To use this file:
>> +# bash$ cd ${build_dir}/gdb
>> +# bash$ make check
>> RUNTESTFLAGS="--host_board=local-remote-host-native
>> --target_board=local-remote-host-native"
>> +
>> +if { $board_type == "target" } {
>> +    set_board_info compiler gcc
>
> Why do we need to also use the board as a target board?
>

Because [is_remote target] is true when I pass
--host_board=local-remote-host-native
--target_board=local-remote-host-native to DejaGNU.  If I do
"--host_board=local-remote-host-native (--target_board=unix)",
[is_remote target] is false.  Since I am doing test under target == host
!= build, so [is_remote target] is expected to be true, isn't?

>> +}
>
>> +if { $board_type == "host" } {
>> +    set_board_info gdb_opts "-ex \"dir ${tmp_dir}\""
>
> No biggie, but this:
>
>   set_board_info gdb_opts "-d \"${tmp_dir}\""
>
> looks a little simpler to me, just for the fact that it runs
> through less code / fewer indirections in GDB.

OK, I'll fix it.

I realize that the rationale and explanations are missing for this board
file, and I'll add more comments about them if the board file is OK.

-- 
Yao (齐尧)


  reply	other threads:[~2014-08-29  1:38 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-28 13:35 Yao Qi
2014-08-28 14:27 ` Pedro Alves
2014-08-29  1:38   ` Yao Qi [this message]
2014-08-28 21:17 ` Jan Kratochvil
2014-08-29  1:55   ` Yao Qi
2014-08-29 12:30     ` Jan Kratochvil
2014-09-01  8:14       ` Yao Qi
2014-09-01  8:44         ` Jan Kratochvil
2014-08-29  3:28 ` Doug Evans
2014-09-02  2:52 ` Yao Qi
2014-09-02 14:53   ` Doug Evans
2014-09-04 13:22     ` Yao Qi
2014-09-15  4:46       ` Yao Qi
2014-09-15  4:55         ` Doug Evans
2014-09-15  5:35       ` Doug Evans
2014-09-15  7:59         ` Yao Qi

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=87a96of59j.fsf@codesourcery.com \
    --to=yao@codesourcery.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