aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.dwarf2/macro-source-path.c
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@efficios.com>2025-04-17 15:37:20 -0400
committerSimon Marchi <simon.marchi@polymtl.ca>2025-04-20 01:01:57 -0400
commit1a710618a51b6cb10ed3d7a5d2fa4ced7bae4228 (patch)
tree7fe8ea032b7e50048346bec76d4a399126709a57 /gdb/testsuite/gdb.dwarf2/macro-source-path.c
parent5cfabe75dbaef32f1506f02c172219536baff4c4 (diff)
downloadbinutils-1a710618a51b6cb10ed3d7a5d2fa4ced7bae4228.zip
binutils-1a710618a51b6cb10ed3d7a5d2fa4ced7bae4228.tar.gz
binutils-1a710618a51b6cb10ed3d7a5d2fa4ced7bae4228.tar.bz2
gdb/dwarf: remove dwarf2_section_info::get_size
The comment over dwarf2_section_info::get_size says: In other cases, you must call this function, because for compressed sections the size field is not set correctly until the section has been read From what I can see (while debugging a test case compiled with -gz on Linux), that's not true. For compressed sections, bfd_section_size returns the uncompressed size. asection::size contains the uncompressed size while asection::compressed_size contains the compressed size: (top-gdb) p sec $13 = (asection *) 0x521000119778 (top-gdb) p sec.compressed_size $14 = 6191 (top-gdb) p sec.size $15 = 12116 I therefore propose to remove dwarf2_section_info::get_size, as it appears that reading in the section is orthogonal to knowing its size. If the assumption above is false, it would be nice to document in which case it's false. I checked the callers, and I don't think that we need to add any dwarf2_section_info::read calls to compensate for the fact that get_size used to do it. Change-Id: I428571e532301d49f1d8242d687e1fcb819b75c1 Approved-By: Tom Tromey <tom@tromey.com>
Diffstat (limited to 'gdb/testsuite/gdb.dwarf2/macro-source-path.c')
0 files changed, 0 insertions, 0 deletions