If there is a problem with GNU_str_index or strx form in read_str_index the error produced is: Offset from DW_FORM_GNU_str_index or DW_FORM_strx pointing outside of .debug_str.dwo section But when called through read_stub_str_index the section name should not be .debug_str.dwo. Which is really confusing when trying to debug what is wrong with a debug file.
Sending a patch.
https://sourceware.org/pipermail/gdb-patches/2024-April/208191.html
The master branch has been updated by Tom Tromey <tromey@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=c7d73a715775ade814370212726d50ab4b7c6fe0 commit c7d73a715775ade814370212726d50ab4b7c6fe0 Author: Tom Tromey <tromey@adacore.com> Date: Wed Apr 17 07:42:28 2024 -0600 Use section name in DWARF error message A bug points out that a certain error message in read_str_index uses a hard-coded section name. This patch changes it to use dwarf2_section_info::get_name instead, like the other errors in the function. No test because it didn't seem worthwhile. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=31639 Approved-By: Simon Marchi <simon.marchi@efficios.com>
Fixed.