public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug debug/96383] [8/9/10/11 Regression] Full ABI information missing from GCC compiled C
Date: Fri, 31 Jul 2020 13:19:38 +0000	[thread overview]
Message-ID: <bug-96383-4-TtKPoShsUP@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-96383-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #25 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Richard Biener <rguenth@gcc.gnu.org>:

https://gcc.gnu.org/g:c6ef9d8d3f11221df1ea6358b8d4e79e42f074fb

commit r11-2455-gc6ef9d8d3f11221df1ea6358b8d4e79e42f074fb
Author: Richard Biener <rguenther@suse.de>
Date:   Thu Jul 30 11:46:43 2020 +0200

    debug/96383 - emit debug info for used external functions

    This makes sure to emit full declaration DIEs including
    formal parameters for used external functions.  This helps
    debugging when debug information of the external entity is
    not available and also helps external tools cross-checking
    ABI compatibility which was the bug reporters use case.

    For cc1 this affects debug information size as follows:

         VM SIZE                     FILE SIZE
     ++++++++++++++ GROWING       ++++++++++++++
      [ = ]       0 .debug_info   +1.63Mi  +1.3%
      [ = ]       0 .debug_str     +263Ki  +3.4%
      [ = ]       0 .debug_abbrev  +101Ki  +4.9%
      [ = ]       0 .debug_line   +5.71Ki  +0.0%
       +44%     +16 [Unmapped]        +48  +1.2%

     -------------- SHRINKING     --------------
      [ = ]       0 .debug_loc       -213  -0.0%
      -0.0%     -48 .text             -48  -0.0%
      [ = ]       0 .debug_ranges     -16  -0.0%

      -0.0%     -32 TOTAL         +1.99Mi  +0.6%

    and DWARF compression via DWZ can only shave off minor bits
    here.

    Previously we emitted no DIEs for external functions at all
    unless they were referenced via DW_TAG_GNU_call_site which
    for some GCC revs caused a regular DIE to appear and since
    GCC 4.9 only a stub without formal parameters.  This means
    at -O0 we did not emit any DIE for external functions
    but with optimization we emitted stubs.

    2020-07-30  Richard Biener  <rguenther@suse.de>

            PR debug/96383
            * langhooks-def.h (lhd_finalize_early_debug): Declare.
            (LANG_HOOKS_FINALIZE_EARLY_DEBUG): Define.
            (LANG_HOOKS_INITIALIZER): Amend.
            * langhooks.c: Include cgraph.h and debug.h.
            (lhd_finalize_early_debug): Default implementation from
            former code in finalize_compilation_unit.
            * langhooks.h (lang_hooks::finalize_early_debug): Add.
            * cgraphunit.c (symbol_table::finalize_compilation_unit):
            Call the finalize_early_debug langhook.

    gcc/c-family/
            * c-common.h (c_common_finalize_early_debug): Declare.
            * c-common.c: Include debug.h.
            (c_common_finalize_early_debug): finalize_early_debug langhook
            implementation generating debug for extern declarations.

    gcc/c/
            * c-objc-common.h (LANG_HOOKS_FINALIZE_EARLY_DEBUG):
            Define to c_common_finalize_early_debug.

    gcc/cp/
            * cp-objcp-common.h (LANG_HOOKS_FINALIZE_EARLY_DEBUG):
            Define to c_common_finalize_early_debug.

    gcc/testsuite/
            * gcc.dg/debug/dwarf2/pr96383-1.c: New testcase.
            * gcc.dg/debug/dwarf2/pr96383-2.c: Likewise.

    libstdc++-v3/
            * testsuite/20_util/assume_aligned/3.cc: Use -g0.

  parent reply	other threads:[~2020-07-31 13:19 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-29 21:20 [Bug c/96383] New: Full ABI information missing " woodard at redhat dot com
2020-07-29 21:23 ` [Bug c/96383] " woodard at redhat dot com
2020-07-29 21:23 ` woodard at redhat dot com
2020-07-30  3:52 ` [Bug debug/96383] " woodard at redhat dot com
2020-07-30  6:14 ` [Bug debug/96383] [8/9/10/11 Regression] " rguenth at gcc dot gnu.org
2020-07-30  8:24 ` rguenth at gcc dot gnu.org
2020-07-30  9:01 ` jakub at gcc dot gnu.org
2020-07-30  9:06 ` rguenther at suse dot de
2020-07-30  9:09 ` jakub at gcc dot gnu.org
2020-07-30  9:34 ` rguenth at gcc dot gnu.org
2020-07-30 12:34 ` [Bug debug/96383] [8/9/10/11 Regression] Full ABI information " rguenth at gcc dot gnu.org
2020-07-30 13:29 ` rguenth at gcc dot gnu.org
2020-07-31  8:23 ` ebotcazou at gcc dot gnu.org
2020-07-31  8:28 ` jakub at gcc dot gnu.org
2020-07-31  8:43 ` rguenth at gcc dot gnu.org
2020-07-31  8:49 ` jakub at gcc dot gnu.org
2020-07-31  8:51 ` ebotcazou at gcc dot gnu.org
2020-07-31  8:52 ` rguenther at suse dot de
2020-07-31  9:00 ` jakub at gcc dot gnu.org
2020-07-31  9:10 ` rguenther at suse dot de
2020-07-31  9:15 ` jakub at gcc dot gnu.org
2020-07-31 10:04 ` rguenther at suse dot de
2020-07-31 12:04 ` ebotcazou at gcc dot gnu.org
2020-07-31 12:10 ` jakub at gcc dot gnu.org
2020-07-31 12:23 ` rguenther at suse dot de
2020-07-31 13:19 ` cvs-commit at gcc dot gnu.org [this message]
2020-07-31 13:20 ` [Bug debug/96383] [8/9/10 " rguenth at gcc dot gnu.org
2020-07-31 13:20 ` rguenth at gcc dot gnu.org
2020-08-02 18:42 ` slyfox at gcc dot gnu.org
2020-12-02 12:17 ` aoliva at gcc dot gnu.org
2020-12-02 12:27 ` rguenther at suse dot de
2021-04-30  8:07 ` rguenth at gcc dot gnu.org
2021-05-14  9:53 ` [Bug debug/96383] [9/10 " jakub at gcc dot gnu.org
2021-06-01  8:18 ` rguenth at gcc dot gnu.org
2022-05-27  9:43 ` [Bug debug/96383] [10 " rguenth at gcc dot gnu.org
2022-06-28 10:41 ` jakub at gcc dot gnu.org
2023-07-07  8:59 ` rguenth at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-96383-4-TtKPoShsUP@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).