[lldb] Warn the user about starting the --func-regex parameter with a… #1190
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
…n asterisk
Summary:
Sometimes users think that setting a function regex for all function that contain the word 'needle' in their
name looks like this:
*needle*
. However, LLDB only searches the function name and doesn't fully matchit against the regex, so the leading and trailing '*' operators don't do anything and actually just cause the
regex engine to reject the regular expression with "repetition-operator operand invalid".
This patch makes this a bit more obvious to the user by printing a warning that a leading '' before this
regular expression here doesn't have any purpose (and will cause an error). This doesn't attempt to detect
a case where there is only a trailing '' as that would involve parsing the regex and it seems the most
common way to end up in this situation is by doing
rbreak *needle*
.Reviewers: JDevlieghere
Reviewed By: JDevlieghere
Differential Revision: https://reviews.llvm.org/D78809
Small follow-up for rdar://problem/62233561
(cherry picked from commit aaf68cd)