Skip to content

Commit 2353393

Browse files
committed
[DWARF} Use LLVM's debug line parser in LLDB.
The line number table header was substantially revised in DWARF 5 and is not fully supported by LLDB's current debug line implementation. This patch replaces the LLDB debug line parser with its counterpart in LLVM. This was possible because of the limited contact surface between the code to parse the DWARF debug line section and the rest of LLDB. We pay a small cost in terms of performance and memory usage. This is something we plan to address in the near future. Differential revision: https://reviews.llvm.org/D62570 llvm-svn: 368742
1 parent bddab07 commit 2353393

File tree

7 files changed

+187
-1210
lines changed

7 files changed

+187
-1210
lines changed

lldb/include/lldb/Core/FileSpecList.h

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ class Stream;
2525
/// A class that contains a mutable list of FileSpec objects.
2626
class FileSpecList {
2727
public:
28+
typedef std::vector<FileSpec> collection;
29+
typedef collection::const_iterator const_iterator;
30+
2831
/// Default constructor.
2932
///
3033
/// Initialize this object with an empty file list.
@@ -191,9 +194,10 @@ class FileSpecList {
191194
static size_t GetFilesMatchingPartialPath(const char *path, bool dir_okay,
192195
FileSpecList &matches);
193196

197+
const_iterator begin() const { return m_files.begin(); }
198+
const_iterator end() const { return m_files.end(); }
199+
194200
protected:
195-
typedef std::vector<FileSpec>
196-
collection; ///< The collection type for the file list.
197201
collection m_files; ///< A collection of FileSpec objects.
198202
};
199203

lldb/include/lldb/Symbol/CompileUnit.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,8 @@ class CompileUnit : public std::enable_shared_from_this<CompileUnit>,
298298
/// A line table object pointer that this object now owns.
299299
void SetLineTable(LineTable *line_table);
300300

301+
void SetSupportFiles(const FileSpecList &support_files);
302+
301303
void SetDebugMacros(const DebugMacrosSP &debug_macros);
302304

303305
/// Set accessor for the variable list.

lldb/source/Plugins/SymbolFile/DWARF/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ add_lldb_library(lldbPluginSymbolFileDWARF PLUGIN
2222
DWARFDebugArangeSet.cpp
2323
DWARFDebugInfo.cpp
2424
DWARFDebugInfoEntry.cpp
25-
DWARFDebugLine.cpp
2625
DWARFDebugMacro.cpp
2726
DWARFDebugRanges.cpp
2827
DWARFDeclContext.cpp

0 commit comments

Comments
 (0)