This is an archive of the discontinued LLVM Phabricator instance.

[lldb] Skip check for conflicting filter/synth when adding a new regex.
ClosedPublic

Authored by jgorbe on Sep 23 2022, 3:34 PM.

Details

Summary

When adding a new synthetic child provider, we check for an existing
conflicting filter in the same category (and vice versa). This is done
by trying to match the new type name against registered formatters.

However, the new type name we're registered can also be a regex
(type synth add -x), and in this case the conflict check is just
wrong: it will try to match the new regex as if it was a type name,
against previously registered regexes.

See https://github.com/llvm/llvm-project/issues/57947 for a longer
explanation with concrete examples of incorrect behavior.

Diff Detail

Event Timeline

jgorbe created this revision.Sep 23 2022, 3:34 PM
Herald added a project: Restricted Project. · View Herald TranscriptSep 23 2022, 3:34 PM
jgorbe requested review of this revision.Sep 23 2022, 3:34 PM
jgorbe updated this revision to Diff 462637.Sep 23 2022, 6:44 PM

Added a couple of test cases to TestDataFormatterPythonSynth.py.

labath added subscribers: jingham, labath.

The current behavior is clearly not useful, but I don't have any context to be able to determine whether there's something else that can be done about that. @jingham might have it.

Ping? If anyone has other suggestions for reviewers I'd appreciate them.

labath accepted this revision.Oct 6 2022, 7:46 AM

Let's just skip this check. Though it might be fun to implement an emptyness-of-intersection check for two regular expressions, that's: a) overkill; b) impossible if you include backreferences.

This revision is now accepted and ready to land.Oct 6 2022, 7:46 AM