For mips there are more subarchs like mips32r2, mips32r6. This patch uses re.match("^mips",arch) and triple = 'mips' to check if architecture string starts with mips.
Details
- Reviewers
clayborg jaydeep - Commits
- rGb6e0f95ba18e: Merging r260362: --------------------------------------------------------------…
rGe92e3606dd40: [LLDB][MIPS] Generalise MIPS arch names Patch by Nitesh Jain
rLLDB260362: [LLDB][MIPS] Generalise MIPS arch names
rL260362: [LLDB][MIPS] Generalise MIPS arch names
Diff Detail
- Repository
- rL LLVM
Event Timeline
Are you sure the triple keyword parameter supports this syntax? It doesn't
appear to be a regex since you're matching "mips*" instead of "mips.*". I
believe the regular string matching algorithm uses the python in keyword
(which does a substring check), so just saying triple = "mips" should
work I think.
Thanks zturner.
The triple is match using re.match(triple, lldb.DBG.GetSelectedPlatform().GetTriple()).
I will update diff with the suggested changes.
I believe we recently switched "archs" so that we auto detect the type so you could use a regular expression. See above inlined comments.
Good to go unless you want to adopt any of my inlined suggestions.
packages/Python/lldbsuite/test/functionalities/thread/crash_during_step/TestCrashDuringStep.py | ||
---|---|---|
24 ↗ | (On Diff #46750) | You can use archs in this case if you want to by assigning it to a compiled regular expression: @expectedFailureAll(archs=re.compile('^mips')) # IO error due to breakpoint at invalid address |
packages/Python/lldbsuite/test/functionalities/watchpoint/hello_watchlocation/TestWatchLocation.py | ||
34 ↗ | (On Diff #46750) | Could use: @expectedFailureAll(archs=re.compile('^mips')) |
packages/Python/lldbsuite/test/functionalities/watchpoint/step_over_watchpoint/TestStepOverWatchpoint.py | ||
76 ↗ | (On Diff #46750) | should this be: if re.match("^mips",arch): |
I know this is super confusing but expectedFailureAll doesn't yet support
regular expressions. I'm working on this code as we speak, so it will
soon. But what you're probably thinking of is skipUnlessArch (but
ironically not skipIfArch or expectedFailureArch). AHHHHHHHHH.
Anyway, that's why I'm fixing all this stuff, to make everything
consistent. For now if he's using expectedFailureAll (which is the
recommended way), none of the keyword arguments will take a regex.
Correction: If he's using expectedFailureAll, only the 'triple=' keyword
will take a regex.
packages/Python/lldbsuite/test/functionalities/thread/crash_during_step/TestCrashDuringStep.py | ||
---|---|---|
24 ↗ | (On Diff #46913) | Retain the triple checking logic . since expectedFailureAll doesn't yet support regular expressions for archs parameter. |
packages/Python/lldbsuite/test/functionalities/watchpoint/hello_watchlocation/TestWatchLocation.py | ||
34 ↗ | (On Diff #46913) | Retain the triple checking logic . since expectedFailureAll doesn't yet support regular expressions for archs parameter. |
updates diff with triple =re.compile('^mips') to check if architecture string starts with mips.