aboutsummaryrefslogtreecommitdiff
path: root/src/common/dwarf_cu_to_module.cc
diff options
context:
space:
mode:
authorLudovic Guegan <ludovic.guegan@gmail.com>2018-11-13 13:00:07 +0100
committerTed Mielczarek <ted.mielczarek@gmail.com>2018-11-21 15:38:37 +0000
commit12ecff373a5013fc166057e83c9d607b3255ae96 (patch)
tree6febfc8da74ac75d90c73fc4b7df4737824aa57f /src/common/dwarf_cu_to_module.cc
parentConditionally define BPLOG_IF (diff)
downloadbreakpad-12ecff373a5013fc166057e83c9d607b3255ae96.tar.xz
Skip empty DWARF code range when mapping lines
BUG=777 Change-Id: Ic6d05eee3ff4660b6d087999a8cea04a1ee3e92b Reviewed-on: https://chromium-review.googlesource.com/c/1333507 Reviewed-by: Ted Mielczarek <ted.mielczarek@gmail.com>
Diffstat (limited to 'src/common/dwarf_cu_to_module.cc')
-rw-r--r--src/common/dwarf_cu_to_module.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/common/dwarf_cu_to_module.cc b/src/common/dwarf_cu_to_module.cc
index e5071ba7..4f870ad4 100644
--- a/src/common/dwarf_cu_to_module.cc
+++ b/src/common/dwarf_cu_to_module.cc
@@ -931,8 +931,9 @@ class FunctionRange {
Module::Function *function;
};
-// Fills an array of ranges with pointers to the functions which owns them.
-// The array is sorted in ascending order and the ranges are non-overlapping.
+// Fills an array of ranges with pointers to the functions which owns
+// them. The array is sorted in ascending order and the ranges are non
+// empty and non-overlapping.
static void FillSortedFunctionRanges(vector<FunctionRange> &dest_ranges,
vector<Module::Function *> *functions) {
@@ -946,7 +947,9 @@ static void FillSortedFunctionRanges(vector<FunctionRange> &dest_ranges,
ranges_it != ranges.cend();
++ranges_it) {
FunctionRange range(*ranges_it, func);
- dest_ranges.push_back(range);
+ if (range.size != 0) {
+ dest_ranges.push_back(range);
+ }
}
}