[Lldb-commits] [PATCH] D16049: [LLDB][MIPS] A small fix in GetBreakableLoadAddress() for MIPS

Bhushan Attarde via lldb-commits lldb-commits at lists.llvm.org
Thu Jan 14 07:58:52 PST 2016


bhushan added a comment.

In http://reviews.llvm.org/D16049#326634, @labath wrote:

> In http://reviews.llvm.org/D16049#326631, @bhushan wrote:
>
> > Hi Zachary,
> >
> > If we use @skipIf then the list would require to contain all possible MIPS variations and the list will grow long.
> >  for ex: @skipIf(archs=not_in(['mips32','mips32r2', 'mips32r3', 'mips64','mips64r2', 'mips64r3', 'mips64r6' ......]))
> >
> > @skipUnlessMips covers all these possible values using regular expression matching.
>
>
> I agree with Zachary that we have too many decorators and we shouldn't be expanding their number, it's simply not sustainable. I see two options here:
>
> - add a `getMipsArchitectures()` function and then write `archs=not_in(getMipsArchitectures())`
> - add a `not_regex()` function and write `archs=not_regex('mips.*')` How does that sound?


I think adding `not_ regex()` sounds better option to me just because in future if MIPS adds another architecture variation then `getMipsArchitectures()` would require an update.

`not_regex` will look like this:

def not_regex(pattern):
 return lambda x : not re.match(pattern, x)`

and python test file will use it as:

`@skipIf(archs=not_regex('mips*'))`

If Greg and Zachary also agrees then I will submit a patch for this.


Repository:
  rL LLVM

http://reviews.llvm.org/D16049





More information about the lldb-commits mailing list