From patchwork Mon Mar 22 08:38:51 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Biener X-Patchwork-Id: 1456418 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=sourceware.org; envelope-from=gcc-patches-bounces@gcc.gnu.org; receiver=) Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4F3nwP23Ybz9sRR for ; Mon, 22 Mar 2021 19:38:59 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 67C1F3858004; Mon, 22 Mar 2021 08:38:56 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by sourceware.org (Postfix) with ESMTPS id 338EF3858D29 for ; Mon, 22 Mar 2021 08:38:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 338EF3858D29 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=rguenther@suse.de X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id F1BB2AD38; Mon, 22 Mar 2021 08:38:51 +0000 (UTC) Date: Mon, 22 Mar 2021 09:38:51 +0100 (CET) From: Richard Biener To: gcc-patches@gcc.gnu.org Subject: [PATCH] Warn to not add debug hook targets Message-ID: User-Agent: Alpine 2.21 (LSU 202 2017-01-01) MIME-Version: 1.0 X-Spam-Status: No, score=-11.4 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: jakub@redhat.com Errors-To: gcc-patches-bounces@gcc.gnu.org Sender: "Gcc-patches" This adds a boiler-plate warning to the debug hooks structure to strongly discourage people from adding new debug hook targets since we want to get rid of the current abstraction in favor of maintaining a DWARF view of debug in the middle-end and have support for alternate output formats to be generated off that DWARF representation. OK? 2021-03-22 Richard Biener * debug.h: Add deprecation warning. --- gcc/debug.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gcc/debug.h b/gcc/debug.h index 67e52677b31..cd265ffbc99 100644 --- a/gcc/debug.h +++ b/gcc/debug.h @@ -21,6 +21,10 @@ /* This structure contains hooks for the debug information output functions, accessed through the global instance debug_hooks set in toplev.c according to command line options. */ +/* WARNING: Do not add new debug hook targets - DWARF will be the only + way to speak debug to the middle-end once we are able to get rid of + the remaining targets. If you need alternate output formats instead + generate them off the DWARF representation. */ struct gcc_debug_hooks { /* Initialize debug output. MAIN_FILENAME is the name of the main