forked from OSchip/llvm-project
Fix a problem with line tables & .o files that start with code with no line table entries.
If you have code before the first line table entry when debugging with .o files on macOS, the LineTable entry search code was assigning all that code to the first line table entry. Don't do that. <rdar://problem/31095765> llvm-svn: 298289
This commit is contained in:
parent
c440572715
commit
2dc4a3e91b
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue