Skip to content

Commit b79edf9

Browse files
author
Bar Soloveychik
committed
[LLDB] added getName method in SBModule
1 parent e47d5eb commit b79edf9

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

lldb/include/lldb/API/SBModule.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,9 @@ class LLDB_API SBModule {
296296
/// Remove any global modules which are no longer needed.
297297
static void GarbageCollectAllocatedModules();
298298

299+
/// Return the name of the module.
300+
const char *GetName() const;
301+
299302
private:
300303
friend class SBAddress;
301304
friend class SBFrame;

lldb/source/API/SBModule.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -671,3 +671,11 @@ void SBModule::GarbageCollectAllocatedModules() {
671671
const bool mandatory = false;
672672
ModuleList::RemoveOrphanSharedModules(mandatory);
673673
}
674+
675+
const char *SBModule::GetName() const {
676+
LLDB_INSTRUMENT_VA(this);
677+
if (!m_opaque_sp) {
678+
return nullptr;
679+
}
680+
return m_opaque_sp->GetObjectName().AsCString();
681+
}

0 commit comments

Comments
 (0)