From: Simon Marchi <simon.marchi@polymtl.ca>
To: Eli Zaretskii <eliz@gnu.org>, gdb@sourceware.org
Subject: Re: Demangling in backtraces
Date: Sat, 13 Mar 2021 21:46:32 -0500 [thread overview]
Message-ID: <6005438b-e445-05f4-f063-d62016d2885a@polymtl.ca> (raw)
In-Reply-To: <8335wzjuuk.fsf@gnu.org>
On 2021-03-13 3:55 a.m., Eli Zaretskii via Gdb wrote:
> Ping! Does the silence mean we don't have such a feature in GDB?
>
>> Date: Sat, 06 Mar 2021 20:56:13 +0200
>> From: Eli Zaretskii via Gdb <gdb@sourceware.org>
>>
>> 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.
Simon
next prev parent reply other threads:[~2021-03-14 2:46 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-06 18:56 Eli Zaretskii
2021-03-13 8:55 ` Eli Zaretskii
2021-03-14 2:46 ` Simon Marchi [this message]
2021-03-14 5:45 ` Eli Zaretskii
2021-03-14 7:29 ` Andreas Schwab
2021-03-14 7:43 ` Eli Zaretskii
2021-03-14 8:09 ` Nagmat Nazarov
2021-03-14 7:28 ` Andreas Schwab
2021-03-14 7:36 ` Eli Zaretskii
2021-03-14 8:26 ` Andreas Schwab
2021-03-14 9:40 ` Eli Zaretskii
2021-03-14 7:54 ` Jeffrey Walton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6005438b-e445-05f4-f063-d62016d2885a@polymtl.ca \
--to=simon.marchi@polymtl.ca \
--cc=eliz@gnu.org \
--cc=gdb@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).