llvm-project
cebf86eb - [lldb][Format] Make function name frame-format variables work without debug-info (#137408)

Commit
164 days ago
[lldb][Format] Make function name frame-format variables work without debug-info (#137408) This patch makes the frame-format variables introduced in https://github.com/llvm/llvm-project/pull/131836 also work when no debug-info is available. Previously, we assumed `sc.function` was available, but without debug-info we might only have `sc.symbol`. We don't really need the `sc.function` apart from when formatting arguments. For the function arguments case I added a fallback that will just print the arguments we get from the demangler (which is what LLDB does for stacktraces with no debug-info anyway). Ideally we'd have a separate `FormatEntity::Entry::Type::FunctionArguments` that will just print the arguments from the demangler and have something like the following in the `plugin.cplusplus.display.function-name-format`: ``` { ${function.formatted-arguments} || ${function.arguments} } ``` I.e., when we can't format the arguments, print the ones from the demangler. But we currently don't have the `||` operator in the frame-format language yet.
Author
Parents
Loading