diff options
Diffstat (limited to 'lldb/source/API/SBModule.cpp')
-rw-r--r-- | lldb/source/API/SBModule.cpp | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/lldb/source/API/SBModule.cpp b/lldb/source/API/SBModule.cpp index 4e9dfb0c1e62..c30529b37eb1 100644 --- a/lldb/source/API/SBModule.cpp +++ b/lldb/source/API/SBModule.cpp @@ -1,4 +1,4 @@ -//===-- SBModule.cpp --------------------------------------------*- C++ -*-===// +//===-- SBModule.cpp ------------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -75,7 +75,7 @@ const SBModule &SBModule::operator=(const SBModule &rhs) { return LLDB_RECORD_RESULT(*this); } -SBModule::~SBModule() {} +SBModule::~SBModule() = default; bool SBModule::IsValid() const { LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBModule, IsValid); @@ -401,8 +401,8 @@ lldb::SBSymbolContextList SBModule::FindFunctions(const char *name, const bool symbols_ok = true; const bool inlines_ok = true; FunctionNameType type = static_cast<FunctionNameType>(name_type_mask); - module_sp->FindFunctions(ConstString(name), nullptr, type, symbols_ok, - inlines_ok, *sb_sc_list); + module_sp->FindFunctions(ConstString(name), CompilerDeclContext(), type, + symbols_ok, inlines_ok, *sb_sc_list); } return LLDB_RECORD_RESULT(sb_sc_list); } @@ -417,8 +417,8 @@ SBValueList SBModule::FindGlobalVariables(SBTarget &target, const char *name, ModuleSP module_sp(GetSP()); if (name && module_sp) { VariableList variable_list; - module_sp->FindGlobalVariables(ConstString(name), nullptr, max_matches, - variable_list); + module_sp->FindGlobalVariables(ConstString(name), CompilerDeclContext(), + max_matches, variable_list); for (const VariableSP &var_sp : variable_list) { lldb::ValueObjectSP valobj_sp; TargetSP target_sp(target.GetSP()); @@ -683,6 +683,13 @@ lldb::SBAddress SBModule::GetObjectFileEntryPointAddress() const { return LLDB_RECORD_RESULT(sb_addr); } +uint32_t SBModule::GetNumberAllocatedModules() { + LLDB_RECORD_STATIC_METHOD_NO_ARGS(uint32_t, SBModule, + GetNumberAllocatedModules); + + return Module::GetNumberAllocatedModules(); +} + namespace lldb_private { namespace repro { @@ -757,6 +764,8 @@ void RegisterMethods<SBModule>(Registry &R) { GetObjectFileHeaderAddress, ()); LLDB_REGISTER_METHOD_CONST(lldb::SBAddress, SBModule, GetObjectFileEntryPointAddress, ()); + LLDB_REGISTER_STATIC_METHOD(uint32_t, SBModule, GetNumberAllocatedModules, + ()); } } |