[patch] Skip gdb.threads/execl.exp on remote target
Yao Qi
yao@codesourcery.com
Thu Jun 23 07:16:00 GMT 2011
On 06/22/2011 11:52 PM, Pedro Alves wrote:
> On Friday 17 June 2011 10:26:43, Yao Qi wrote:
>> As far as I know, exec event is not handled in gdbserver or in remote
>> debugging,
>
> Correct.
>
>> so this patch is to skip gdb.threads/execl.exp on remote target.
>
> Patch is okay.
Committed. http://sourceware.org/ml/gdb-cvs/2011-06/msg00132.html
>
>>
>> The condition checking in my patch is "{ [is_remote target] }", instead
>> of "{ [is_remote target] || ![isnative] }", which is widely used
>> elsewhere, because "![isnative]" can be regarded as a subset of
>> "is_remote target". I can't think of a case that non-native debugger
>> works with non-remote board. Am I missing something?
>
> isnative just returns whether the build _triplet_ is the same
> as the target _triplet_. It's unrelated to whether the remote
> protocol is being used or not, and it's orthogonal to the board
> in use. Not using it here is correct, because for example,
> one may be running dejagnu on a x86-linux machine (build), using
> remote host testing to test a native debugger running on
> an HP-UX host, and we'd still want gdb's native exec support
> to be tested then.
>
Following your example, I am wondering is "proc isnative" used correctly
or is "proc isnative" what we need in test cases? In your example
(build = x86_64-linux, target == host == HP-UX), foll-fork.exp,
foll-vfork.exp, multi-forks.exp, and checkpoint.exp can be run, but they
are skipped because isnative returns 0.
If so, we may need a new proc is_native_debugger, and replace isnative
by it in some cases. What do you think?
# Return 1 if a native debugger is build (either native build or cross #
build).
proc is_native_debugger { } {
global target_triplet
global host_triplet
if {[string match $host_triplet $target_triplet]} {
return 1
}
return 0
}
--
Yao (é½å°§)
More information about the Gdb-patches
mailing list