aboutsummaryrefslogtreecommitdiff
path: root/gdb/dwarf2read.c
diff options
context:
space:
mode:
authorDoug Evans <dje@google.com>2012-06-27 14:26:09 +0000
committerDoug Evans <dje@google.com>2012-06-27 14:26:09 +0000
commit0bc3a05c52a91935d21ce006d68bc6455f63eeff (patch)
treea579e4312649e73b0e5d790eaeea30633899e11d /gdb/dwarf2read.c
parent5204774b6f67d634e3571a9cf92f5e1e2d2bbea8 (diff)
downloadgdb-0bc3a05c52a91935d21ce006d68bc6455f63eeff.zip
gdb-0bc3a05c52a91935d21ce006d68bc6455f63eeff.tar.gz
gdb-0bc3a05c52a91935d21ce006d68bc6455f63eeff.tar.bz2
* dwarf2read.c (per_cu_header_read_in): Simplify, and handle
type units.
Diffstat (limited to 'gdb/dwarf2read.c')
-rw-r--r--gdb/dwarf2read.c8
1 files changed, 2 insertions, 6 deletions
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;
}