This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: testsuites, reverse, and is_remote(target)
- From: Pedro Alves <pedro at codesourcery dot com>
- To: gdb at sourceware dot org
- Cc: Michael Snyder <msnyder at vmware dot com>
- Date: Thu, 22 Oct 2009 23:27:26 +0100
- Subject: Re: testsuites, reverse, and is_remote(target)
- References: <4AE0BCC8.90309@vmware.com>
On Thursday 22 October 2009 21:12:56, Michael Snyder wrote:
> I've been stuck for a while on my reverse debugging tests,
> which has been holding me back from activating them so that
> they run by default.
>
> The difficulty is detecting when I should run them as native,
> and when they should run as remote. For native, I would use
> the process record commands such as "record". Remote would
> be something like Simics or UndoDB or VMware.
>
> The typical test, "is_remote target", doesn't really help because
> all it does is compare to see whether target == host. Not much
> help if both are, say, i386-linux.
I think you're confusing board with triple. is_remote target checks
the target board (the boardfile.exp file's basename, or the
machine hostname), not the target triplet (i383-linux).
[istarget foo] is what matches the target triplet with foo.
gdb's testsuite already has a bunch of similar checks where
we assume [isnative] && ![is_remote target] assumes "test
with native/child target". grep will tell ya.
--
Pedro Alves