From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-f47.google.com (mail-wr1-f47.google.com [209.85.221.47]) by sourceware.org (Postfix) with ESMTPS id CB7BD3858CD1 for ; Thu, 23 Nov 2023 17:36:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org CB7BD3858CD1 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=palves.net Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org CB7BD3858CD1 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=209.85.221.47 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1700761013; cv=none; b=xv3nBILyc2begX55641gzI+agMVzwnZlUASAYEOBujJpQYiDjQ7R5yZYg4N3skYn2O3dgEDMh61mHTBq/9z7iPOqoOzLSXbp96fN/MR3HMNjnl6Qhx0VH7roaRTNo1nAB4y/TWnpk2m9QJIg7O6yHq4zTp0mgMPmfRkwEGsCuG4= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1700761013; c=relaxed/simple; bh=rp6GhRbcg516bDG8/sFNgIkH5DNkUkm+Opc1cPKlXbE=; h=Message-ID:Date:MIME-Version:Subject:To:From; b=Kj+nfmZD0nkg8bFy00lp5Wu+MsT1njUHuTwToz0a7tUgySAf+gxZIiaDWYPubekhncWerLoUSOTqaNiQe1iuy7KkWEiy8f5rO0U+xVtDUNCuErEAZDBKOY9HFIBfzzJDzLE4Jd1NtXq5ad7L8SzlBfpI2bBjuaOlqVqg7xZF5YI= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-wr1-f47.google.com with SMTP id ffacd0b85a97d-332e58d4219so378158f8f.0 for ; Thu, 23 Nov 2023 09:36:51 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700761010; x=1701365810; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=DVqxQ3BnLdh9c3e7lsbWyAnnQ3CQZhvGKGUgb9VCm+s=; b=ZRUga9AxN6DMhWoZsZHZkwwBh9bYE557lPiyNJqDYAcTlt2HdUVNSAJcnYv2wbVHXj JWZwHinfWyZlzs3Qd/8acoB0CQd72+3YpN5HVuUMdPjZ+TCzXmZTXPDTJclyic2dR1/W qwTw3UX0uErPlRTFBqI0vcwQ8oiw7DXI3mWhVb/RuUcowLP7KHSNx53kGyEajCnPBKiN PsqbqMfyom33JSaB6430TneHL/gua8fTmDsL9AtFILn5tcAeBrEjX3jVfoYAhvEvALZE 8BbHfF9Pa6YvonhNwFnE2deJwvB9hM05Sd7kNSBOAWaD2wkFmoA24BIJufGNpMPQKKht zauw== X-Gm-Message-State: AOJu0YwHaPr5tQtSQqNOVrTsMIemmwXmltaTw3bW4SJ87CdOyFoWBNhn iFTV/S25/WWG0XZaaX7K3Uiik9NAcFOkuw== X-Google-Smtp-Source: AGHT+IFlzFpRX353nSjUVa9fnJSSiQkaZuaV/DZRl5gB8KNn4xzU8bsYCsKBswCRyAQAQin8njLX6g== X-Received: by 2002:adf:ef4e:0:b0:332:d257:2155 with SMTP id c14-20020adfef4e000000b00332d2572155mr108093wrp.22.1700761009610; Thu, 23 Nov 2023 09:36:49 -0800 (PST) Received: from ?IPV6:2001:8a0:f91e:1a00:ae93:8c06:7141:2fad? ([2001:8a0:f91e:1a00:ae93:8c06:7141:2fad]) by smtp.gmail.com with ESMTPSA id f8-20020adff988000000b00332e75eae4asm444591wrr.85.2023.11.23.09.36.48 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 23 Nov 2023 09:36:48 -0800 (PST) Message-ID: Date: Thu, 23 Nov 2023 17:36:42 +0000 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 0/6] v2 of libdiagnostics Content-Language: en-US To: David Malcolm , gcc-patches@gcc.gnu.org, binutils@sourceware.org Cc: Nick Clifton , Simon Sobisch References: <20231106222959.2707741-1-dmalcolm@redhat.com> <20231121222019.646253-1-dmalcolm@redhat.com> From: Pedro Alves In-Reply-To: <20231121222019.646253-1-dmalcolm@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,KAM_DMARC_STATUS,KAM_SHORT,LIKELY_SPAM_BODY,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Hi David, On 2023-11-21 22:20, David Malcolm wrote: > Here's v2 of the "libdiagnostics" shared library idea; see: > https://gcc.gnu.org/wiki/libdiagnostics > > As in v1, patch 1 (for GCC) shows libdiagnostic.h (the public > header file), along with examples of simple self-contained programs that > show various uses of the API. > > As in v1, patch 2 (for GCC) is the work-in-progress implementation. > > Patch 3 (for GCC) adds a new libdiagnostics++.h, a wrapper API providing > some syntactic sugar when using the API from C++. I've been using this > to "eat my own dogfood" and write a simple SARIF-dumping tool: > https://github.com/davidmalcolm/libdiagnostics-sarif-dump > > Patch 4 (for GCC) is an internal change needed by patch 1. > > Patch 5 (for GCC) updates GCC's source printing code so that when > there's no column information, we don't print annotation lines. This > fixes the extra lines seen using it from gas discussed in: > https://gcc.gnu.org/pipermail/gcc-patches/2023-November/635575.html > > Patch 6 (for binutils) is an updated version of the experiment at using > the API from gas. > > Thoughts? Do you have plans on making this a top level library instead? That would allow easily making it a non-optional dependency for binutils, as we could have the library in the binutils-gdb repo as well, for instance. From the Cauldron discussion I understood that the diagnostics stuff doesn't depend on much of GCC's data structures, and doesn't rely on the garbage collector. Is there something preventing that? (Other than "it's-a-matter-of-time/effort", of course.) Pedro Alves