public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jonathan Wakely <jwakely@redhat.com>
To: "François Dumont" <frs.dumont@gmail.com>
Cc: "libstdc++" <libstdc++@gcc.gnu.org>,
	gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: _GLIBCXX_DEBUG_BACKTRACE broken
Date: Mon, 29 Jan 2024 19:14:15 +0000	[thread overview]
Message-ID: <CACb0b4k34QspfccGozbB+wcDy0uGYg7+AyshdjVR2w-ax_TzxA@mail.gmail.com> (raw)
In-Reply-To: <45ed84f4-ac9b-45bb-aa3c-7edc086df916@gmail.com>

On Mon, 29 Jan 2024 at 18:30, François Dumont <frs.dumont@gmail.com> wrote:
>
> I had missed it, thanks.
>
> Here is a patch to fix debug mode doc then.
>
> libstdc++: Fix _GLIBCXX_DEBUG_BACKTRACE macro documentation
>
> libstdc++-v3/ChangeLog:
>
>      * doc/xml/manual/debug_mode.xml: Link against libstdc++exp.a to use
>      _GLIBCXX_DEBUG_BACKTRACE macro.
>
> Ok to commit ?

Yes please - thanks.


>
> François
>
> On 29/01/2024 11:10, Jonathan Wakely wrote:
> > On Mon, 29 Jan 2024 at 06:13, François Dumont <frs.dumont@gmail.com> wrote:
> >> Hi
> >>
> >> I'm trying to use _GLIBCXX_DEBUG_BACKTRACE to debug some crash in debug
> >> mode.
> >>
> >> So I buit library with --enable-libstdcxx-backtrace=yes
> >>
> >> But when I build any test I have:
> >>
> >> /usr/bin/ld: /tmp/cctvPvlb.o: in function
> >> `__gnu_debug::_Error_formatter::_Error_formatter(char const*, unsigned
> >> int, char const*)':
> >> /home/fdumont/dev/gcc/build/x86_64-pc-linux-gnu/libstdc++-v3/include/debug/formatter.h:597:
> >> undefined reference to `__glibcxx_backtrace_create_state'
> >> /usr/bin/ld:
> >> /home/fdumont/dev/gcc/build/x86_64-pc-linux-gnu/libstdc++-v3/include/debug/formatter.h:598:
> >> undefined reference to `__glibcxx_backtrace_full'
> >>
> >> -lstdc++_libbacktrace does not help as it cannot find it.
> > You need to use -lstdc++exp.a instead, as documented at
> > https://gcc.gnu.org/gcc-14/changes.html#libstdcxx
> >
> > I changed this with
> > https://gcc.gnu.org/g:b96b554592c5cbb6a2c1797ffcb5706fd295f4fd
> >


      reply	other threads:[~2024-01-29 19:14 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <a046d8eb-2576-476b-a487-955d41907347@gmail.com>
     [not found] ` <CACb0b4=4Af3bJTjpDPLqCEr_xJ4osG_aWQA1OUWPAE3_ZcwZiw@mail.gmail.com>
2024-01-29 18:29   ` François Dumont
2024-01-29 19:14     ` Jonathan Wakely [this message]

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=CACb0b4k34QspfccGozbB+wcDy0uGYg7+AyshdjVR2w-ax_TzxA@mail.gmail.com \
    --to=jwakely@redhat.com \
    --cc=frs.dumont@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=libstdc++@gcc.gnu.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).