RFC: SBValue Metadata Provider

It shouldn’t be hard to support multiple validators for a given provider name, since we can return a SBStructuredData that is an array of SBStructuredData’s. So collecting and returning the results should be straightforward.

One way to do this would be to allow a provider to state that it wants to be a “generate all matches” rather than a “first match wins” by giving itself a “sub-kind” name. So you would do:

(lldb) type metadata add --python-class --providername sanity-checker --sub-kind ThisKind

Then when we see a provider that has subkinds, we’ll know to run all the matching providers of that name, and then produce an array of results:

{[sub-kind : ThisKind; value : {IsGood: True ; Description: “I see no evil”; ExtraKeyForThisKind : “mysterious, huh?”},
sub-kind: AnotherKind : value {IsGood: False ; Description: “How could you have missed the smell”}]

Something like that. That way lldb doesn’t have to get involved in the logic of what it means to get various different results when presenting them.