[Lldb-commits] [lldb] [LLDB] Add optional callback function to `TypeMatcher` (PR #143748)
Pavel Labath via lldb-commits
lldb-commits at lists.llvm.org
Thu Jun 12 06:58:07 PDT 2025
labath wrote:
A low-tech way to support both STL versions would be to do a dispatch inside the data formatter:
```
StdStringSummaryProvider(value) {
if (IsGnuSTL(value))
return GnuStringSummaryProvider(value);
return MSVCStringSummaryProvider(value);
}
```
It's not a complete solution as it doesn't allow for a distributed setup (vendor A writes a formatter for type `Foo`, vendor B writes a formatter for its type `Foo`, user C needs to debug both `Foo` types, so it installs both formatters), but for formatters that are a part of lldb (i.e. STL types), that should work fine. And maybe STL types are the only place where this matters?
https://github.com/llvm/llvm-project/pull/143748
More information about the lldb-commits
mailing list