From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by sourceware.org (Postfix) with ESMTP id 498C6385E004 for ; Thu, 5 Aug 2021 14:07:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 498C6385E004 Received: from mail-qv1-f69.google.com (mail-qv1-f69.google.com [209.85.219.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-231-CYM48V8ANciCWiCwu4YJCA-1; Thu, 05 Aug 2021 10:07:31 -0400 X-MC-Unique: CYM48V8ANciCWiCwu4YJCA-1 Received: by mail-qv1-f69.google.com with SMTP id v15-20020a0ccd8f0000b0290335f005a486so3896512qvm.22 for ; Thu, 05 Aug 2021 07:07:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=Xv/G1ed3LVGeHTdJRIZVFy5Vk8q+7FtJ6axUvvY2RPs=; b=ICibYbsbCKBDT2ZbvKPXYRDwI7pOMrP22ZBevDgTHvkMHHmbhCPvKi5F+yP1WpVe1a J2CJdIjSLUnxXqcgQOb24m/6f+rncCEsYvwCzfHzC3ayBjVcje884EvX4VJJp+vWVUmE n7yKiXsjCbtoSPJAUHrpx1hgzk7ol2JAgdu/Ol7UxEF7AyAaeBE4hK9sj2ezsfIJj+VL zhAoYFmMLn62+n8Z9kxgVH9D+6w9Ms4UIhy/mtz+5JFQhUMDw91ZEPsn5OakHAiz6ToF hr6xhD+01Z/q330idltRGV0e5DV0QKKA3flm2UzICMygcweJs9qCh9MHWC+eBmUSNyDw QB1A== X-Gm-Message-State: AOAM533Dij585gOZHpbez2iqP6e/stxIZRFLnZFxWjto8ogu5bm1fI8p PDUL57vujGDIoFNWrGNPhwrwf5HIOLevN+kh1zu0uHkndtXuWyip08MgHulBaJMJFpm/VQ/KvKz YtxTxA+M= X-Received: by 2002:ac8:665a:: with SMTP id j26mr4693579qtp.254.1628172451321; Thu, 05 Aug 2021 07:07:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxGKE9LclJES9yYmBavPrCcNf8bFkNmNgobujCAyZ5bMwtDfAa5d7bP2Ru9iuXnl9oWQY7g1A== X-Received: by 2002:ac8:665a:: with SMTP id j26mr4693562qtp.254.1628172451132; Thu, 05 Aug 2021 07:07:31 -0700 (PDT) Received: from t14s.localdomain (c-73-69-212-193.hsd1.nh.comcast.net. [73.69.212.193]) by smtp.gmail.com with ESMTPSA id bl40sm2975239qkb.64.2021.08.05.07.07.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Aug 2021 07:07:30 -0700 (PDT) Message-ID: <23ab7917f051e8f1de8f50eaffae7f0289e2e2b0.camel@redhat.com> Subject: Re: Noob question about simple customization of GCC. From: David Malcolm To: Alacaster Soi , gcc@gcc.gnu.org Date: Thu, 05 Aug 2021 10:07:29 -0400 In-Reply-To: References: User-Agent: Evolution 3.38.4 (3.38.4-1.fc33) MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00, BODY_8BITS, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Aug 2021 14:07:34 -0000 On Wed, 2021-08-04 at 00:17 -0700, Alacaster Soi via Gcc wrote: > How hard would it be to add a tree-like structure and > headers/sections to > the -v gcc option so you can see the call structure. Would this be a > reasonable first contribution/customization for a noob? It'll be a > while > before I can reasonably work on this. > GCC > version > config > > ---- cc1 main.c >       | cc1 config and >       | output > -> tempfile.s >                                         '*extra space' *between each > lowest > level command > > ---- as -v >       | output > -> tempfile.o > > > ---- collect2.exe >       | output >       |----- ld.exe >              | output > -> tempfile.exe > I really like this UI idea, but I don't know how easy/hard it would be to implement. The code that implements figuring out what to invoke (the "driver") is in gcc/gcc.c, which is a big source file. FWIW there's also code in gcc/tree-diagnostic-path.cc to emit ASCII art that does something a bit similar to your idea, which might be worth looking at (in this case, to visualize function calls and returns along a code path). Hope this is helpful Dave