aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog10
-rw-r--r--gdb/dwarf2read.c3
2 files changed, 12 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index dd57b3e..f899248 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,13 @@
+2018-11-30 Jan Kratochvil <jan.kratochvil@redhat.com>
+ Keith Seitz <keiths@redhat.com>
+ Tom Tromey <tom@tromey.com>
+ Sergio Durigan Junior <sergiodj@redhat.com>
+
+ https://bugzilla.redhat.com/show_bug.cgi?id=1613614
+ * dwarf2read.c (dwarf2_find_containing_comp_unit): Add
+ 'mid_cu->length' to '*cu_off' when checking if 'sect_off' is
+ inside the CU.
+
2018-11-30 Pedro Alves <palves@redhat.com>
* aix-thread.c (aix_thread_target) <aix_thread_target>: Delete.
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index d2a8cd4..8bfbd69 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -25126,7 +25126,8 @@ dwarf2_find_containing_comp_unit (sect_offset sect_off,
mid_cu = dwarf2_per_objfile->all_comp_units[mid];
cu_off = &mid_cu->sect_off;
if (mid_cu->is_dwz > offset_in_dwz
- || (mid_cu->is_dwz == offset_in_dwz && *cu_off >= sect_off))
+ || (mid_cu->is_dwz == offset_in_dwz
+ && *cu_off + mid_cu->length >= sect_off))
high = mid;
else
low = mid + 1;