Skip to content

Commit 1aca8ed

Browse files
committed
[lldb][ELF] Add a comment to explain address class map type
It was pointed out that ordering is crucial here, so note that. I also looked into using a vector instead, as described in https://llvm.org/docs/ProgrammersManual.html#dss-sortedvectorset. Which this is in theory perfect for, but we have at least 2 places that update the map and both would need to sort/unique each time. Plus this code is pretty bug prone. If there is future refactoring it's one thing to consider.
1 parent fc57f88 commit 1aca8ed

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,9 @@ class ObjectFileELF : public lldb_private::ObjectFile {
187187
typedef DynamicSymbolColl::iterator DynamicSymbolCollIter;
188188
typedef DynamicSymbolColl::const_iterator DynamicSymbolCollConstIter;
189189

190+
/// An ordered map of file address to address class. Used on architectures
191+
/// like Arm where there is an alternative ISA mode like Thumb. The container
192+
/// is ordered so that it can be binary searched.
190193
typedef std::map<lldb::addr_t, lldb_private::AddressClass>
191194
FileAddressToAddressClassMap;
192195

0 commit comments

Comments
 (0)