diff options
Diffstat (limited to 'lldb/source/Commands/CommandObjectTarget.cpp')
-rw-r--r-- | lldb/source/Commands/CommandObjectTarget.cpp | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/lldb/source/Commands/CommandObjectTarget.cpp b/lldb/source/Commands/CommandObjectTarget.cpp index d0092c2..da50fe0 100644 --- a/lldb/source/Commands/CommandObjectTarget.cpp +++ b/lldb/source/Commands/CommandObjectTarget.cpp @@ -3474,6 +3474,17 @@ public: m_type = eLookupTypeFunctionOrSymbol; break; + case 'c': + bool value, success; + value = OptionArgParser::ToBoolean(option_arg, false, &success); + if (success) { + m_cached = value; + } else { + return Status::FromErrorStringWithFormatv( + "invalid boolean value '%s' passed for -c option", option_arg); + } + break; + default: llvm_unreachable("Unimplemented option"); } @@ -3485,6 +3496,7 @@ public: m_type = eLookupTypeInvalid; m_str.clear(); m_addr = LLDB_INVALID_ADDRESS; + m_cached = false; } llvm::ArrayRef<OptionDefinition> GetDefinitions() override { @@ -3497,6 +3509,7 @@ public: // parsing options std::string m_str; // Holds name lookup lldb::addr_t m_addr = LLDB_INVALID_ADDRESS; // Holds the address to lookup + bool m_cached = true; }; CommandObjectTargetModulesShowUnwind(CommandInterpreter &interpreter) @@ -3583,9 +3596,12 @@ protected: if (abi) start_addr = abi->FixCodeAddress(start_addr); - FuncUnwindersSP func_unwinders_sp( - sc.module_sp->GetUnwindTable() - .GetUncachedFuncUnwindersContainingAddress(start_addr, sc)); + UnwindTable &uw_table = sc.module_sp->GetUnwindTable(); + FuncUnwindersSP func_unwinders_sp = + m_options.m_cached + ? uw_table.GetFuncUnwindersContainingAddress(start_addr, sc) + : uw_table.GetUncachedFuncUnwindersContainingAddress(start_addr, + sc); if (!func_unwinders_sp) continue; |