aboutsummaryrefslogtreecommitdiff
path: root/gdb/i386-windows-nat.c
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@efficios.com>2025-02-25 15:54:56 -0500
committerSimon Marchi <simon.marchi@polymtl.ca>2025-02-25 22:43:49 -0500
commit2f0521c0d6f6ea6fecef96cf825656263abb570d (patch)
tree9b183e8be4672b4f2bc641112047bd185f445a96 /gdb/i386-windows-nat.c
parent2b5a48b6a9dddd6a2f7d189f3fa906adcab51b92 (diff)
downloadfsf-binutils-gdb-master.zip
fsf-binutils-gdb-master.tar.gz
fsf-binutils-gdb-master.tar.bz2
gdb/dwarf: fix signature_type created with nullptr sectionHEADmaster
Commit c44ab627b02 ("gdb/dwarf: pass section to dwarf2_per_cu_data constructor") introduced a regression when using dwp. It can be reproduced with: $ make check TESTS="gdb.base/ptype-offsets.exp" RUNTESTFLAGS="--target_board=fission-dwp" Then, to investigate: $ ./gdb -nx -q --data-directory=data-directory testsuite/outputs/gdb.base/ptype-offsets/ptype-offsets -ex 'ptype int' Reading symbols from testsuite/outputs/gdb.base/ptype-offsets/ptype-offsets... /home/smarchi/src/binutils-gdb/gdb/dwarf2/read.c:3195:38: runtime error: member call on null pointer of type 'struct dwarf2_section_info' Commit c44ab627b02 removed the assignment of signatured_type::section (dwarf2_per_cu_data::section, really) in fill_in_sig_entry_from_dwo_entry with the justification that the section was already set when constructing the signatured_type. Well, that was true except for one spot in lookup_dwp_signatured_type which passes a nullptr section to add_type_unit. Fix that by passing the section to add_type_unit in that one spot. This is the same section that would have been set by fill_in_sig_entry_from_dwo_entry before. Add some asserts in the dwarf2_per_cu_data constructor to verity that the passed dwarf2_per_bfd and dwarf2_section_info are non-nullptr. Change-Id: If27dae6b4727957c96defc058c7e4be31472005b Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=32739 Co-Authored-By: Tom de Vries <tdevries@suse.de> Approved-By: Tom Tromey <tom@tromey.com>
Diffstat (limited to 'gdb/i386-windows-nat.c')
0 files changed, 0 insertions, 0 deletions