From 36374493cd4c82fea229c56abf874ca55b0ec856 Mon Sep 17 00:00:00 2001 From: Doug Evans Date: Fri, 27 Aug 2010 23:09:58 +0000 Subject: [PATCH] * dwarf2read.c (dw2_require_line_header): Read from .debug_types as appropriate. --- gdb/ChangeLog | 5 +++++ gdb/dwarf2read.c | 11 ++++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 5280cc488b1..8e25db542bb 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2010-08-27 Doug Evans + + * dwarf2read.c (dw2_require_line_header): Read from .debug_types + as appropriate. + 2010-08-27 Tom Tromey * dwarf2read.c (dwarf2_attach_fields_to_type): Don't set diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index ebab2652ddd..ac954e66fcd 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -1990,6 +1990,7 @@ dw2_require_line_header (struct objfile *objfile, struct attribute *attr; struct cleanup *cleanups; struct die_info *comp_unit_die; + struct dwarf2_section_info* sec; gdb_byte *beg_of_comp_unit, *info_ptr, *buffer; int has_children, i; struct dwarf2_cu cu; @@ -2007,9 +2008,13 @@ dw2_require_line_header (struct objfile *objfile, cleanups = make_cleanup (free_stack_comp_unit, &cu); - dwarf2_read_section (objfile, &dwarf2_per_objfile->info); - buffer_size = dwarf2_per_objfile->info.size; - buffer = dwarf2_per_objfile->info.buffer; + if (this_cu->from_debug_types) + sec = &dwarf2_per_objfile->types; + else + sec = &dwarf2_per_objfile->info; + dwarf2_read_section (objfile, sec); + buffer_size = sec->size; + buffer = sec->buffer; info_ptr = buffer + this_cu->offset; beg_of_comp_unit = info_ptr; -- 2.30.2