aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorTom de Vries <tdevries@suse.de>2022-07-11 11:36:54 +0200
committerTom de Vries <tdevries@suse.de>2022-07-11 11:36:54 +0200
commita4ca6efe0589d0a030920a4686b692208c82a028 (patch)
tree0909ee9bcf967fadc68fa2b98bb04ae07dd525db /gdb
parentb2657999964250911846e947a23093507fe084fa (diff)
downloadgdb-a4ca6efe0589d0a030920a4686b692208c82a028.zip
gdb-a4ca6efe0589d0a030920a4686b692208c82a028.tar.gz
gdb-a4ca6efe0589d0a030920a4686b692208c82a028.tar.bz2
[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.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/dwarf2/read.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c
index 55e61b88..40a1879 100644
--- a/gdb/dwarf2/read.c
+++ b/gdb/dwarf2/read.c
@@ -7207,7 +7207,7 @@ read_comp_units_from_section (dwarf2_per_objfile *per_objfile,
*slot = sig_ptr;
}
this_cu->sect_off = sect_off;
- this_cu->length = cu_header.length + cu_header.initial_length_size;
+ this_cu->length = cu_header.get_length ();
this_cu->is_dwz = is_dwz;
this_cu->section = section;
/* Init this asap, to avoid a data race in the set_version in