From: Simon Marchi Date: Thu, 15 Jan 2026 03:55:27 +0000 (-0500) Subject: gdb/dwarf: cleanup dwarf2_locate_v{2,5}_dwp_sections parameters X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ef034c34d9d79c607e00029217310d852d7a8d58;p=thirdparty%2Fbinutils-gdb.git gdb/dwarf: cleanup dwarf2_locate_v{2,5}_dwp_sections parameters Change the `void *` parameter to `dwp_file *`. Remove the unused `abfd` parameter. These were probably missed when converting the caller from bfd_map_over_sections to gdb_bfd_sections. Change-Id: I0420c83ba35ae304901b9e140584ebaba31f2330 Approved-By: Tom Tromey --- diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c index b8c55e640dc..e3c8f1e333f 100644 --- a/gdb/dwarf2/read.c +++ b/gdb/dwarf2/read.c @@ -7472,10 +7472,9 @@ dwarf2_locate_common_dwp_sections (struct objfile *objfile, bfd *abfd, have version 2 or 5 until we parse the cu_index/tu_index sections. */ static void -dwarf2_locate_v2_dwp_sections (struct objfile *objfile, bfd *abfd, - asection *sectp, void *dwp_file_ptr) +dwarf2_locate_v2_dwp_sections (objfile *objfile, asection *sectp, + dwp_file *dwp_file) { - struct dwp_file *dwp_file = (struct dwp_file *) dwp_file_ptr; const struct dwop_section_names *names = &dwop_section_names; /* Look for specific sections that we need. */ @@ -7515,10 +7514,9 @@ dwarf2_locate_v2_dwp_sections (struct objfile *objfile, bfd *abfd, have version 2 or 5 until we parse the cu_index/tu_index sections. */ static void -dwarf2_locate_v5_dwp_sections (struct objfile *objfile, bfd *abfd, - asection *sectp, void *dwp_file_ptr) +dwarf2_locate_v5_dwp_sections (objfile *objfile, asection *sectp, + dwp_file *dwp_file) { - struct dwp_file *dwp_file = (struct dwp_file *) dwp_file_ptr; const struct dwop_section_names *names = &dwop_section_names; /* Look for specific sections that we need. */ @@ -7665,11 +7663,9 @@ open_and_init_dwp_file (dwarf2_per_objfile *per_objfile) for (asection *sec : gdb_bfd_sections (dwp_file->dbfd)) { if (dwp_file->version == 2) - dwarf2_locate_v2_dwp_sections (objfile, dwp_file->dbfd.get (), sec, - dwp_file.get ()); + dwarf2_locate_v2_dwp_sections (objfile, sec, dwp_file.get ()); else - dwarf2_locate_v5_dwp_sections (objfile, dwp_file->dbfd.get (), sec, - dwp_file.get ()); + dwarf2_locate_v5_dwp_sections (objfile, sec, dwp_file.get ()); } dwarf_read_debug_printf ("DWP file found: %s", dwp_file->name);