diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2017-04-16 16:04:10 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2017-04-16 16:04:10 +0000 |
commit | 74a628f776edb588bff8f8f5cc16eac947c9d631 (patch) | |
tree | dc32e010ac4902621e5a279bfeb48628f7f0e166 /source/Symbol/LineTable.cpp | |
parent | afed7be32164a598f8172282c249af7266c48b46 (diff) |
Notes
Diffstat (limited to 'source/Symbol/LineTable.cpp')
-rw-r--r-- | source/Symbol/LineTable.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/source/Symbol/LineTable.cpp b/source/Symbol/LineTable.cpp index 02ab0c1261173..3cb3053029275 100644 --- a/source/Symbol/LineTable.cpp +++ b/source/Symbol/LineTable.cpp @@ -11,8 +11,8 @@ #include "lldb/Core/Address.h" #include "lldb/Core/Module.h" #include "lldb/Core/Section.h" -#include "lldb/Core/Stream.h" #include "lldb/Symbol/CompileUnit.h" +#include "lldb/Utility/Stream.h" #include <algorithm> using namespace lldb; @@ -230,6 +230,14 @@ bool LineTable::FindLineEntryByAddress(const Address &so_addr, } } } + else + { + // There might be code in the containing objfile before the first line + // table entry. Make sure that does not get considered part of the first + // line table entry. + if (pos->file_addr > so_addr.GetFileAddress()) + return false; + } // Make sure we have a valid match and that the match isn't a // terminating @@ -501,6 +509,7 @@ LineTable *LineTable::LinkLineTable(const FileRangeMap &file_range_map) { if (terminate_previous_entry && !sequence.m_entries.empty()) { assert(prev_file_addr != LLDB_INVALID_ADDRESS); + UNUSED_IF_ASSERT_DISABLED(prev_file_addr); sequence.m_entries.push_back(sequence.m_entries.back()); if (prev_end_entry_linked_file_addr == LLDB_INVALID_ADDRESS) prev_end_entry_linked_file_addr = |