[Bug debug/95601] New: Remove workaround for GDB PR in pass_partition_blocks::gate

vries at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Jun 9 09:30:26 GMT 2020


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95601

            Bug ID: 95601
           Summary: Remove workaround for GDB PR in
                    pass_partition_blocks::gate
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: debug
          Assignee: unassigned at gcc dot gnu.org
          Reporter: vries at gcc dot gnu.org
  Target Milestone: ---

Current GCC contains this workaround in bb-reorder.c:
...
          /* Workaround a bug in GDB where read_partial_die doesn't cope        
             with DIEs with DW_AT_ranges, see PR81115.  */
          && !(in_lto_p && MAIN_NAME_P (DECL_NAME (fun->decl))));
...

The PR81115 is a typo, it actually refers to gcc PR 81155, as we can see from
the log message:
...
commit 8f72ce2cec8b8961f381995eb6e2c5de1cd0f3d3
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Fri Jan 12 19:20:49 2018 +0100

    re PR debug/81155 (Debug make check regressions in GCC 8.0)

            PR debug/81155
            * bb-reorder.c (pass_partition_blocks::gate): In lto don't
partition
            main to workaround a bug in GDB.

    From-SVN: r256592
...

The PR81155 discusses a GDB bug, but no GDB counterpart was filed, so I've
filed https://sourceware.org/bugzilla/show_bug.cgi?id=26095 for this purpose.

The GDB PR may be a duplicate of
https://sourceware.org/bugzilla/show_bug.cgi?id=23331 , in which case this
should be fixed from gdb release 9.1 onwards.

So, on the GCC side we need to test whether indeed the workaround is no longer
required for a recent gdb, and if so, either remove the workaround, or add a
comment to the workaround about starting which gdb release the workaround is no
longer required.


More information about the Gcc-bugs mailing list