From: Doug Evans Date: Wed, 27 Jun 2012 14:26:09 +0000 (+0000) Subject: * dwarf2read.c (per_cu_header_read_in): Simplify, and handle X-Git-Tag: sid-snapshot-20120701~53 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0bc3a05c52a91935d21ce006d68bc6455f63eeff;p=external%2Fbinutils.git * dwarf2read.c (per_cu_header_read_in): Simplify, and handle type units. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 05c8b06..7b96f29 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2012-06-27 Doug Evans + + * dwarf2read.c (per_cu_header_read_in): Simplify, and handle + type units. + 2012-06-26 Doug Evans * dwarf2read.c (read_and_check_comp_unit_head): Delete unnecessary diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index 2aef8fcc..4b43adf 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -16808,19 +16808,15 @@ static const struct comp_unit_head * per_cu_header_read_in (struct comp_unit_head *cu_headerp, struct dwarf2_per_cu_data *per_cu) { - struct objfile *objfile; - struct dwarf2_per_objfile *per_objfile; gdb_byte *info_ptr; if (per_cu->cu) return &per_cu->cu->header; - objfile = per_cu->objfile; - per_objfile = objfile_data (objfile, dwarf2_objfile_data_key); - info_ptr = per_objfile->info.buffer + per_cu->offset.sect_off; + info_ptr = per_cu->info_or_types_section->buffer + per_cu->offset.sect_off; memset (cu_headerp, 0, sizeof (*cu_headerp)); - read_comp_unit_head (cu_headerp, info_ptr, objfile->obfd); + read_comp_unit_head (cu_headerp, info_ptr, per_cu->objfile->obfd); return cu_headerp; }