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] Another board file for remote host


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 (éå)


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