I have read that is it possible to run case-insensitive image lookup in lldb (I'm using Xcode 13) by using (?i). However, I cannot get it to work; I must be doing something wrong, and I cannot find any reference discussing this. For instance, if I run "image lookup -rn layoutSubviews", I get plenty of hits, OTOH, if I run "image lookup -rn (?i)layoutsubviews", I get nothing. Can anyone give me any pointers? Thanks in advance
1 Answer
lldb's regular expression matcher supports Posix Extended Regular Expressions. The mode modifiers are not part of that flavor of regular expression.
3 Comments
Torrontés
Are you saying that case-insensitive image lookup is not possible? Thanks.
Jim Ingham
At present, yes. The standard PosixERE engine supports "case insensitive search" as a mode of the regex compile but there's no syntax to trigger that in the expression. lldb's regex matcher doesn't expose the case insensitive match because symbol's are case sensitive so it seemed natural for the search to be case sensitive. It wouldn't be hard to expose the case insensitive search however. If you have a good use case, file a ER with github.com/llvm/llvm-project/issues or if you are adventurous, have a go at adding it yourself.
Torrontés
Actually, that would go way over my head. As for having a good use case, no, it's just curiosity after reading a couple of articles in Medium which claim this is possible and not being able to do it on my own.