[binutils-gdb] gdb/dwarf2: remove erroneous comment in open_and_init_dwo_file

Simon Marchi simark@sourceware.org
Tue Jun 10 15:05:59 GMT 2025


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=e4a998f4b6566fcab0e71c36132250d0ed97a2e7

commit e4a998f4b6566fcab0e71c36132250d0ed97a2e7
Author: Simon Marchi <simon.marchi@polymtl.ca>
Date:   Mon Jun 9 23:07:04 2025 -0400

    gdb/dwarf2: remove erroneous comment in open_and_init_dwo_file
    
    When writing commit 28f15782adab ("gdb/dwarf: read multiple .debug_info.dwo
    sections"), I initially thought that the gcc behavior of producing multiple
    .debug_info.dwo sections was a bug (it is not).  I updated the commit
    message, but it looks like this comment stayed.  Remove it, since it can
    be misleading.
    
    Change-Id: I027712d44b778e836f41afbfafab993da02726ef
    Approved-By: Tom Tromey <tom@tromey.com>

Diff:
---
 gdb/dwarf2/read.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c
index 583b6dbaab0..aa6f6ea904a 100644
--- a/gdb/dwarf2/read.c
+++ b/gdb/dwarf2/read.c
@@ -7635,11 +7635,6 @@ cutu_reader::open_and_init_dwo_file (dwarf2_cu *cu, const char *dwo_name,
 
   this->locate_dwo_sections (per_objfile->objfile, *dwo_file);
 
-  /* There is normally just one .debug_info.dwo section in a DWO file.  But when
-     building with -fdebug-types-section, gcc produces multiple .debug_info.dwo
-     sections.  One for each produced type unit and one for the compile unit.
-     This is not expected, but we can easily enough deal with what gcc
-     produces.  This behavior has been observed with gcc 14.2.1.  */
   for (dwarf2_section_info &section : dwo_file->sections.infos)
     create_dwo_unit_hash_tables (*dwo_file, *cu, section, ruh_kind::COMPILE);


More information about the Gdb-cvs mailing list