From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-x32c.google.com (mail-wm1-x32c.google.com [IPv6:2a00:1450:4864:20::32c]) by sourceware.org (Postfix) with ESMTPS id 2DC09386FC36; Sun, 9 May 2021 15:03:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 2DC09386FC36 Received: by mail-wm1-x32c.google.com with SMTP id n84so7789104wma.0; Sun, 09 May 2021 08:03:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=fjh5Chprxq/X/FJHDAUejsHN9QarvjjFwtNuOH/FzvE=; b=r24Nclw0uWhHBjrohEbfKhYpEU8sHOcQJltBm+NLfmnZMaSKAwUyomx6n0bKBKA9VI RK+1yffTbMkdErztR7ucXi/F9nKVLBNJIjx008LG/A0QeWKtVGTf3ZE6bjLyXc/rnDMu ML7HQkZ2+HRAkx++CbDbLS2m99yJjyApjMYnn7MQ9diZcxCAyA1NaOtHu5f/9CCaMkBi zHMc8uSQhboVQmZ4WeEv3XFLRGHRKm3QpNQ/Rg2a251zdUT8fhLQKhQNsVnkxSsj8SCT PMwu1FgHyqEmkjFyVlHWbeIRH31i9qiBEU7yPG4npnvrw8nrbtprlFUelcoP0bsnxjo7 TZXA== X-Gm-Message-State: AOAM5329ZAkstgs1RLo0Buz+fgKiKXKiR6m9rqAfw11VwaNJaXNZ8gvU CBiIdDnYbNxPBl8J4PyTi6/lIQRKr7c= X-Google-Smtp-Source: ABdhPJyz7A3ZrEJ1wOCnmAPlPHADF+5SW9bl2wZowiBH7sipYUQtfa1ZIZWEJFnsJAxyIlCsxqVKVQ== X-Received: by 2002:a05:600c:293:: with SMTP id 19mr21615725wmk.144.1620572586012; Sun, 09 May 2021 08:03:06 -0700 (PDT) Received: from ?IPv6:2a01:e0a:347:cc80:e528:f3b1:fb6b:9892? ([2a01:e0a:347:cc80:e528:f3b1:fb6b:9892]) by smtp.googlemail.com with ESMTPSA id m13sm18698018wrw.86.2021.05.09.08.03.04 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 09 May 2021 08:03:05 -0700 (PDT) Subject: Re: [PATCH][_GLIBCXX_DEBUG] libbacktrace integration To: Jonathan Wakely Cc: "libstdc++@gcc.gnu.org" , gcc-patches References: <20210505113337.GU3008@redhat.com> <20210507142655.GE3008@redhat.com> From: =?UTF-8?Q?Fran=c3=a7ois_Dumont?= Message-ID: Date: Sun, 9 May 2021 17:03:04 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: <20210507142655.GE3008@redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: fr X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, KAM_SHORT, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, 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: , X-List-Received-Date: Sun, 09 May 2021 15:03:08 -0000 On 07/05/21 4:26 pm, Jonathan Wakely wrote: > On 05/05/21 12:33 +0100, Jonathan Wakely wrote: >> On 24/04/21 15:46 +0200, François Dumont via Libstdc++ wrote: >>> Hi >>> >>>     Here is the patch to add backtrace generation on _GLIBCXX_DEBUG >>> assertions thanks to libbacktrace. > > Ville pointed out that we'll need to use libbacktrace for > std::stacktrace anyway, and it would be > useful if/when we add support for C++ Contracts to the lirbary. > > So let's integrate libbacktrace into libstdc++ properly. Jakub > suggested doing it how libsanitizer does it, which is to rebuild the > libbacktrace sources as part of the libsanitizer build, using the > preprocessor to rename the symbols so that they use reserved names. > e.g. rename backtrace_full to __glibcxx_backtrace_full or something > like that. > > I'll work on getting it building as part of libstdc++ (or maybe as a > separate static library for now, as we do for libstdc++fs.a) and then > you can rework your Debug Mode patch to depend on the private version > of libbacktrace included with libstdc++ (instead of expecting users to > provide it themselves). > Ok, thanks for the info. I will perhaps extract the non-backtrace related stuff from this patch then and I'll rework the backtrace part later.