I noticed today that DW_IDX_die_offset is documented as having a reference form, but right now gdb emits it as: m_abbrev_table.append_unsigned_leb128 (DW_IDX_die_offset); m_abbrev_table.append_unsigned_leb128 (DW_FORM_udata); this should probably be DW_FORM_sec_offset
Setting the target milestone here because this code is new and so we can fix it before it is visible in a release.
DW_FORM_ref_addr is better I think.
https://sourceware.org/pipermail/gdb-patches/2024-February/206505.html
The master branch has been updated by Tom Tromey <tromey@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=932e5949a9f366d149b1b9093c49225502dee890 commit 932e5949a9f366d149b1b9093c49225502dee890 Author: Tom Tromey <tom@tromey.com> Date: Fri Feb 9 17:40:35 2024 -0700 Use DW_FORM_ref_addr for DIE offset in .debug_names Today I realized that while the .debug_names writer uses DW_FORM_udata for the DIE offset, DW_FORM_ref_addr would be more appropriate here. This patch makes this change. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=31361
Fixed.