Skip to content

Commit 6b1618d

Browse files
committed
Move to sbmodulespec
1 parent 68f845f commit 6b1618d

File tree

18 files changed

+33
-32
lines changed

18 files changed

+33
-32
lines changed

lldb/bindings/interface/SBFileSpecListExtensions.i

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,6 @@ STRING_EXTENSION_OUTSIDE(SBFileSpecList)
1010
def __iter__(self):
1111
'''Iterate over all FileSpecs in a lldb.SBFileSpecList object.'''
1212
return lldb_iter(self, 'GetSize', 'GetFileSpecAtIndex')
13-
14-
def __getitem__(self, index):
15-
'''Get an lldb.SBFileSpec at a given index, an invalid SBFileSpec will be returned if the index is invalid.'''
16-
return self.GetFileSpecAtIndex(index)
1713
%}
1814
#endif
1915
}

lldb/bindings/interface/SBModuleSpecListExtensions.i

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@ STRING_EXTENSION_OUTSIDE(SBModuleSpecList)
1010
def __iter__(self):
1111
'''Iterate over all ModuleSpecs in a lldb.SBModuleSpecList object.'''
1212
return lldb_iter(self, 'GetSize', 'GetSpecAtIndex')
13+
14+
def __getitem__(self, index):
15+
'''Get an lldb.SBModuleSpec at a given index, an invalid SBModuleSpec will be returned if the index is invalid.'''
16+
return self.GetSpecAtIndex(index)
1317
%}
1418
#endif
1519
}
16-

lldb/include/lldb/API/SBFileSpecList.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,6 @@ class LLDB_API SBFileSpecList {
4040

4141
private:
4242
friend class SBTarget;
43-
friend class SBModule;
44-
45-
SBFileSpecList(lldb_private::FileSpecList &&list);
4643

4744
const lldb_private::FileSpecList *operator->() const;
4845

lldb/include/lldb/API/SBModule.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ class LLDB_API SBModule {
293293
/// \return
294294
/// A list of filespecs associated with all the separate symbol files
295295
/// associated with this module.
296-
lldb::SBFileSpecList GetSeparateDebugInfoFiles();
296+
lldb::SBModuleSpecList GetSeparateDebugInfoFiles();
297297

298298
lldb::SBAddress GetObjectFileHeaderAddress() const;
299299
lldb::SBAddress GetObjectFileEntryPointAddress() const;

lldb/include/lldb/API/SBModuleSpec.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,9 @@ class SBModuleSpecList {
125125
bool GetDescription(lldb::SBStream &description);
126126

127127
private:
128+
friend class SBModule;
129+
130+
SBModuleSpecList(lldb_private::ModuleSpecList &&module_spec_list);
128131
std::unique_ptr<lldb_private::ModuleSpecList> m_opaque_up;
129132
};
130133

lldb/include/lldb/Core/Module.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -483,7 +483,7 @@ class Module : public std::enable_shared_from_this<Module>,
483483

484484
const FileSpec &GetSymbolFileFileSpec() const { return m_symfile_spec; }
485485

486-
FileSpecList GetSeparateDebugInfoFiles();
486+
ModuleSpecList GetSeparateDebugInfoFiles();
487487

488488
void PreloadSymbols();
489489

lldb/include/lldb/Symbol/SymbolFile.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
#include "lldb/lldb-private.h"
2929
#include "llvm/ADT/DenseSet.h"
3030
#include "llvm/ADT/SmallSet.h"
31-
#include "llvm/ADT/StringMap.h"
3231
#include "llvm/Support/Errc.h"
3332

3433
#include <mutex>
@@ -505,7 +504,9 @@ class SymbolFile : public PluginInterface {
505504
///
506505
/// \return
507506
/// A unique list of all the filespecs, or an empty list.
508-
virtual lldb_private::FileSpecList GetSeparateDebugInfoFiles() { return {}; }
507+
virtual lldb_private::ModuleSpecList GetSeparateDebugInfoFiles() {
508+
return {};
509+
}
509510

510511
virtual lldb::TypeSP
511512
MakeType(lldb::user_id_t uid, ConstString name,

lldb/include/lldb/Symbol/SymbolFileOnDemand.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ class SymbolFileOnDemand : public lldb_private::SymbolFile {
229229
load_all_debug_info);
230230
}
231231

232-
lldb_private::FileSpecList GetSeparateDebugInfoFiles() override {
232+
lldb_private::ModuleSpecList GetSeparateDebugInfoFiles() override {
233233
return m_sym_file_impl->GetSeparateDebugInfoFiles();
234234
}
235235

lldb/source/API/SBFileSpecList.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,6 @@ SBFileSpecList::SBFileSpecList(const SBFileSpecList &rhs) {
3131
m_opaque_up = clone(rhs.m_opaque_up);
3232
}
3333

34-
SBFileSpecList::SBFileSpecList(FileSpecList &&list)
35-
: m_opaque_up(new FileSpecList(std::move(list))) {
36-
LLDB_INSTRUMENT_VA(this);
37-
}
38-
3934
SBFileSpecList::~SBFileSpecList() = default;
4035

4136
const SBFileSpecList &SBFileSpecList::operator=(const SBFileSpecList &rhs) {

lldb/source/API/SBModule.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -633,12 +633,12 @@ lldb::SBFileSpec SBModule::GetSymbolFileSpec() const {
633633
return sb_file_spec;
634634
}
635635

636-
lldb::SBFileSpecList SBModule::GetSeparateDebugInfoFiles() {
636+
lldb::SBModuleSpecList SBModule::GetSeparateDebugInfoFiles() {
637637
ModuleSP module_sp(GetSP());
638638
if (module_sp)
639-
return lldb::SBFileSpecList(module_sp->GetSeparateDebugInfoFiles());
639+
return lldb::SBModuleSpecList(module_sp->GetSeparateDebugInfoFiles());
640640

641-
return lldb::SBFileSpecList();
641+
return lldb::SBModuleSpecList();
642642
}
643643

644644
lldb::SBAddress SBModule::GetObjectFileHeaderAddress() const {

0 commit comments

Comments
 (0)