diff options
author | Doug Evans <dje@google.com> | 2010-08-27 23:09:58 +0000 |
---|---|---|
committer | Doug Evans <dje@google.com> | 2010-08-27 23:09:58 +0000 |
commit | 36374493cd4c82fea229c56abf874ca55b0ec856 (patch) | |
tree | 1a54290771163afcca3c9da1f397a975a207744b /gdb | |
parent | 8b93c54cd74f951dba7ded460baa8a587799b33d (diff) | |
download | gdb-36374493cd4c82fea229c56abf874ca55b0ec856.zip gdb-36374493cd4c82fea229c56abf874ca55b0ec856.tar.gz gdb-36374493cd4c82fea229c56abf874ca55b0ec856.tar.bz2 |
* dwarf2read.c (dw2_require_line_header): Read from .debug_types
as appropriate.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/dwarf2read.c | 11 |
2 files changed, 13 insertions, 3 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 5280cc4..8e25db5 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2010-08-27 Doug Evans <dje@google.com> + + * dwarf2read.c (dw2_require_line_header): Read from .debug_types + as appropriate. + 2010-08-27 Tom Tromey <tromey@redhat.com> * dwarf2read.c (dwarf2_attach_fields_to_type): Don't set diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index ebab265..ac954e6 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; |