diff options
Diffstat (limited to 'lldb/source/Commands/CommandObjectFrame.cpp')
-rw-r--r-- | lldb/source/Commands/CommandObjectFrame.cpp | 27 |
1 files changed, 20 insertions, 7 deletions
diff --git a/lldb/source/Commands/CommandObjectFrame.cpp b/lldb/source/Commands/CommandObjectFrame.cpp index d86b50b..baf64e5 100644 --- a/lldb/source/Commands/CommandObjectFrame.cpp +++ b/lldb/source/Commands/CommandObjectFrame.cpp @@ -881,7 +881,7 @@ bool CommandObjectFrameRecognizerAdd::DoExecute(Args &command, } else { auto module = ConstString(m_options.m_module); auto func = ConstString(m_options.m_function); - StackFrameRecognizerManager::AddRecognizer(recognizer_sp, module, func); + StackFrameRecognizerManager::AddRecognizer(recognizer_sp, module, func, {}); } #endif @@ -959,13 +959,26 @@ protected: bool any_printed = false; StackFrameRecognizerManager::ForEach( [&result, &any_printed](uint32_t recognizer_id, std::string name, - std::string function, std::string symbol, - bool regexp) { - if (name == "") + std::string module, std::string symbol, + std::string alternate_symbol, bool regexp) { + Stream &stream = result.GetOutputStream(); + + if (name.empty()) name = "(internal)"; - result.GetOutputStream().Printf( - "%d: %s, module %s, function %s%s\n", recognizer_id, name.c_str(), - function.c_str(), symbol.c_str(), regexp ? " (regexp)" : ""); + + stream << std::to_string(recognizer_id) << ": " << name; + if (!module.empty()) + stream << ", module " << module; + if (!symbol.empty()) + stream << ", function " << symbol; + if (!alternate_symbol.empty()) + stream << ", symbol " << alternate_symbol; + if (regexp) + stream << " (regexp)"; + + stream.EOL(); + stream.Flush(); + any_printed = true; }); |