[Lldb-commits] [PATCH] Introduce DWARFDataExtractor for 64-Bit DWARF parsing
Ed Maste
emaste at freebsd.org
Wed Oct 23 14:21:33 PDT 2013
================
Comment at: include/lldb/Core/MappedHash.h:17
@@ -16,2 +16,3 @@
+template <typename ExtractorT>
class MappedHash
----------------
I'd like to avoid templatizing this if possible, but I don't see a straightforward way.
================
Comment at: source/Plugins/SymbolFile/DWARF/DWARFDebugArangeSet.h:44
@@ -43,3 +43,3 @@
void Compact();
- bool Extract(const lldb_private::DataExtractor &data, lldb::offset_t *offset_ptr);
+ bool Extract(lldb_private::DWARFDataExtractor &data, lldb::offset_t *offset_ptr);
void Dump(lldb_private::Stream *s) const;
----------------
Dropping the consts is a consequence of setting the 64-bit flag in DWARFDataExtractor::GetDWARFInitialLength.
Would it be reasonable to use a const_cast in there instead?
================
Comment at: source/Plugins/SymbolFile/DWARF/DWARFDebugArangeSet.cpp:186
@@ -185,14 +185,3 @@
// the size appropriate for an address on the target architecture.
- size_t dwarf_offset_size = 4;
- m_header.length = data.GetU32(offset_ptr);
- if (m_header.length == 0xffffffff)
- {
- dwarf_offset_size = 8;
- m_header.length = data.GetU64(offset_ptr);
- }
- else if (m_header.length >= 0xffffff00)
- {
- // Reserved.
- return false;
- }
+ m_header.length = data.GetDWARFInitialLength(offset_ptr);
m_header.version = data.GetU16(offset_ptr);
----------------
Here's the actual cleanup this permits
http://llvm-reviews.chandlerc.com/D2007
More information about the lldb-commits
mailing list