[gdb/symtab] Use comp_unit_head::get_length
authorTom de Vries <tdevries@suse.de>
Mon, 11 Jul 2022 09:36:54 +0000 (11:36 +0200)
committerTom de Vries <tdevries@suse.de>
Mon, 11 Jul 2022 09:36:54 +0000 (11:36 +0200)
commita4ca6efe0589d0a030920a4686b692208c82a028
tree0909ee9bcf967fadc68fa2b98bb04ae07dd525db
parentb2657999964250911846e947a23093507fe084fa
[gdb/symtab] Use comp_unit_head::get_length

There's a spot in read_comp_units_from_section where we explictly use
initial_length_size to get the total length:
...
      this_cu->length = cu_header.length + cu_header.initial_length_size;
...

Instead, just use cu_header.get_length ().

Tested on x86_64-linux.
gdb/dwarf2/read.c