> On Feb 11, 2016, at 12:15 PM, Ted Woodward via lldb-dev
> <[email protected]> wrote:
>
> I’m working on getting the tests running with Hexagon, and have a question
> about identifying the target architecture.
>
> Hexagon LLVM doesn’t use a couple architectures like “x86_64” or “i386”,
> instead we have many architectures, like “v4”, “v5”, “v55”, “v56”, v60”, so
> using self.getArchitecture() can be problematic. I’ve got a list of Hexagon
> architectures in a global supported_hexagon_versions in lldbtest.py. When I
> need to check for Hexagon, should I do something like “self.getArchitecture
> in supported_hexagon_versions”, or something like this:
>
> self.runCmd("target list")
> if "arch=hexagon-*-*," in self.res.GetOutput():
>
> ?
>
> Ted
The architecture should be available from the test infrastructure. We have many
tests that have @expectedFile(archs=re.compile("^mips")). So each test knows
its architecture and this should be available in as a member variable of the
TestBase object that everyone inherits from. Search for "mips" in all tests. I
know some watchpoint tests are different on MIPS because they only have 1
hardware watchpoint available, so they had to work around some issues in those
tests. See how they did things and mimic that.
Greg
_______________________________________________
lldb-dev mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev