diff options
Diffstat (limited to 'gdb/dwarf2/comp-unit-head.c')
-rw-r--r-- | gdb/dwarf2/comp-unit-head.c | 25 |
1 files changed, 10 insertions, 15 deletions
diff --git a/gdb/dwarf2/comp-unit-head.c b/gdb/dwarf2/comp-unit-head.c index 1413971..a35d664 100644 --- a/gdb/dwarf2/comp-unit-head.c +++ b/gdb/dwarf2/comp-unit-head.c @@ -1,6 +1,6 @@ /* DWARF 2 debugging format support for GDB. - Copyright (C) 1994-2024 Free Software Foundation, Inc. + Copyright (C) 1994-2025 Free Software Foundation, Inc. Adapted by Gary Funck (gary@intrepid.com), Intrepid Technology, Inc. with support from Florida State University (under contract @@ -26,7 +26,6 @@ #include "dwarf2/comp-unit-head.h" #include "dwarf2/leb.h" -#include "dwarf2/read.h" #include "dwarf2/section.h" #include "dwarf2/stringify.h" #include "dwarf2/error.h" @@ -149,15 +148,13 @@ read_comp_unit_head (struct comp_unit_head *cu_header, Perform various error checking on the header. */ static void -error_check_comp_unit_head (dwarf2_per_objfile *per_objfile, - struct comp_unit_head *header, - struct dwarf2_section_info *section, - struct dwarf2_section_info *abbrev_section) +error_check_comp_unit_head (comp_unit_head *header, + dwarf2_section_info *section, + dwarf2_section_info *abbrev_section) { const char *filename = section->get_file_name (); - if (to_underlying (header->abbrev_sect_off) - >= abbrev_section->get_size (per_objfile->objfile)) + if (to_underlying (header->abbrev_sect_off) >= abbrev_section->size) error (_(DWARF_ERROR_PREFIX "bad offset (%s) in compilation unit header " "(offset %s + 6) [in module %s]"), @@ -179,12 +176,10 @@ error_check_comp_unit_head (dwarf2_per_objfile *per_objfile, /* See comp-unit-head.h. */ const gdb_byte * -read_and_check_comp_unit_head (dwarf2_per_objfile *per_objfile, - struct comp_unit_head *header, - struct dwarf2_section_info *section, - struct dwarf2_section_info *abbrev_section, - const gdb_byte *info_ptr, - rcuh_kind section_kind) +read_and_check_comp_unit_head (comp_unit_head *header, + dwarf2_section_info *section, + dwarf2_section_info *abbrev_section, + const gdb_byte *info_ptr, rcuh_kind section_kind) { const gdb_byte *beg_of_comp_unit = info_ptr; @@ -194,7 +189,7 @@ read_and_check_comp_unit_head (dwarf2_per_objfile *per_objfile, header->first_die_cu_offset = (cu_offset) (info_ptr - beg_of_comp_unit); - error_check_comp_unit_head (per_objfile, header, section, abbrev_section); + error_check_comp_unit_head (header, section, abbrev_section); return info_ptr; } |