X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;ds=sidebyside;f=gdb%2Fdwarf2%2Fcomp-unit.c;h=847a148cbd2528a758f4b84a1ad221db43fb2637;hb=8266302dc32a88c9e05b4e451e3c2c1516603132;hp=03e804b7086b72f705e035edb4c6408905034e65;hpb=4057dfde49d7867ad41906ed11705e450a08b4cf;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/dwarf2/comp-unit.c b/gdb/dwarf2/comp-unit.c index 03e804b708..847a148cbd 100644 --- a/gdb/dwarf2/comp-unit.c +++ b/gdb/dwarf2/comp-unit.c @@ -129,9 +129,8 @@ read_comp_unit_head (struct comp_unit_head *cu_header, cu_header->addr_size = read_1_byte (abfd, info_ptr); info_ptr += 1; } - cu_header->abbrev_sect_off = (sect_offset) read_offset (abfd, info_ptr, - cu_header, - &bytes_read); + cu_header->abbrev_sect_off + = (sect_offset) cu_header->read_offset (abfd, info_ptr, &bytes_read); info_ptr += bytes_read; if (cu_header->version < 5) { @@ -157,7 +156,7 @@ read_comp_unit_head (struct comp_unit_head *cu_header, if (section_kind == rcuh_kind::TYPE) { LONGEST type_offset; - type_offset = read_offset (abfd, info_ptr, cu_header, &bytes_read); + type_offset = cu_header->read_offset (abfd, info_ptr, &bytes_read); info_ptr += bytes_read; cu_header->type_cu_offset_in_tu = (cu_offset) type_offset; if (to_underlying (cu_header->type_cu_offset_in_tu) != type_offset) @@ -222,16 +221,3 @@ read_and_check_comp_unit_head (struct dwarf2_per_objfile *dwarf2_per_objfile, return info_ptr; } - -/* See comp-unit.h. */ - -LONGEST -read_offset (bfd *abfd, const gdb_byte *buf, - const struct comp_unit_head *cu_header, - unsigned int *bytes_read) -{ - LONGEST offset = read_offset (abfd, buf, cu_header->offset_size); - - *bytes_read = cu_header->offset_size; - return offset; -}