From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 9MimGuqiTWBMGgAAWB0awg (envelope-from ) for ; Sun, 14 Mar 2021 00:45:14 -0500 Received: by simark.ca (Postfix, from userid 112) id 5F8941EF78; Sun, 14 Mar 2021 00:45:14 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 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 (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id A3D221E590 for ; Sun, 14 Mar 2021 00:45:13 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 27727383E802; Sun, 14 Mar 2021 05:45:12 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 27727383E802 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1615700712; bh=6mij9RRrjNdDpZ2ROCjsG/z0/Z7LZjqBWs7TeskYwKk=; h=Date:To:In-Reply-To:Subject:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=GAAlk94spUrOxaZkEmDUbcRo8L+wObzbXVO03V9a8HUap7v/Cl41TnqOLpaorKucC 1mlghPQP6qADZ7TuFTmR6Reew5ITpiqGDK6LdqPfgsbdHJ3cxY6gmT38C5i+p4EnwE HSx0i+Vk33jUEz9MTB7WLaod7/bBAvht2w/w37iA= Received: from eggs.gnu.org (eggs.gnu.org [IPv6:2001:470:142:3::10]) by sourceware.org (Postfix) with ESMTPS id 0CA7B3857C68 for ; Sun, 14 Mar 2021 05:45:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 0CA7B3857C68 Received: from fencepost.gnu.org ([2001:470:142:3::e]:47914) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lLJYq-0008VT-Dc; Sun, 14 Mar 2021 00:45:08 -0500 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:4549 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1lLJYn-00047k-B9; Sun, 14 Mar 2021 00:45:05 -0500 Date: Sun, 14 Mar 2021 07:45:13 +0200 Message-Id: <83pn02gufq.fsf@gnu.org> To: Simon Marchi , Hannes Domani In-Reply-To: <6005438b-e445-05f4-f063-d62016d2885a@polymtl.ca> (message from Simon Marchi on Sat, 13 Mar 2021 21:46:32 -0500) Subject: Re: Demangling in backtraces References: <83h7loun5e.fsf@gnu.org> <8335wzjuuk.fsf@gnu.org> <6005438b-e445-05f4-f063-d62016d2885a@polymtl.ca> X-BeenThere: gdb@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Eli Zaretskii via Gdb Reply-To: Eli Zaretskii Cc: gdb@sourceware.org Errors-To: gdb-bounces@sourceware.org Sender: "Gdb" > From: Simon Marchi > Date: Sat, 13 Mar 2021 21:46:32 -0500 > > >> I have built a C program linked against libgccjit. When it crashes, > >> the backtrace shows mangled names, like this: > >> > >> #0 0x70f5ac3e in libgccjit-0!_Z17gimple_build_callP9tree_nodejz () > >> from D:\usr\bin\libgccjit-0.dll > >> #1 0x7190fa7b in libgccjit-0!_ZN19evrp_range_analyzer5leaveEP15basic_block_def > >> () from D:\usr\bin\libgccjit-0.dll > >> #2 0x71910eef in libgccjit-0!_Z36stmt_uses_0_or_null_in_undefined_wayP6gimple > >> () from D:\usr\bin\libgccjit-0.dll > >> #3 0x710fba2c in libgccjit-0!_Z16execute_one_passP8opt_pass () > >> from D:\usr\bin\libgccjit-0.dll > >> > >> (This is because libgccjit is written in C++, and because the DLL is > >> stripped.) > >> > >> How can I cause GDB to demangle the function names when showing the > >> backtrace in this case? I tried setting language to c++, but that > >> didn't help. > >> > >> TIA > >> > > I don't really know. I've tried making a toy program and shared library > on Linux in C++, without debug symbols, and it "just works": > > #0 0x00007ffff7fc00ed in foo(int) () from ./libfoo.so > #1 0x0000555555555147 in main () > > So maybe it's supposed to "just work" on Windows as well and it doesn't? > I don't really have time to dig into it further. Thanks. So does this mean we don't have any kind of "manual demangler" in GDB that could be turned on in cases like this, when "just works" doesn't? Hannes, any ideas?