From: Pedro Alves <pedro@palves.net>
To: Keith Seitz <keiths@redhat.com>, Carl Love <cel@us.ibm.com>,
Lancelot SIX <lsix@lancelotsix.com>
Cc: Ulrich Weigand <Ulrich.Weigand@de.ibm.com>,
gdb-patches@sourceware.org, Rogerio Alves <rogealve@br.ibm.com>
Subject: Re: [PATCH] Fix gdb.cp/no-dmgl-verbose.exp test
Date: Sat, 30 Apr 2022 02:00:45 +0100 [thread overview]
Message-ID: <5a976d0c-ebeb-300e-bd63-437bcddebe93@palves.net> (raw)
In-Reply-To: <f30863e6-c591-1374-7db1-5e4f3b33ad31@palves.net>
On 2022-04-29 19:40, Pedro Alves wrote:
> Thanks for pointing at "ignore_typedefs" in cp-support.c, Keith. So if I hack out
> that special casing for std::string, like in the patch below, then GDB replaces the
> typedef, and setting the breakpoint works. However, that only works if we debug
> a fully linked binary for some reason... If we debug just the .o file, then the symbol
> still isn't found... That seems yet another bug somewhere.
The fully-linked vs .o file difference was because with just the .o file, there's no main function,
so GDB's language is set to "auto (currently c)". While with a fully-linked binary, the language is
"auto (currently c++)". When the language is C, the typedef is expanded to "class $realtype".
That "class " prefix is not part of the demangled name of the f function, so the breakpoint
setting fails.
next prev parent reply other threads:[~2022-04-30 1:01 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-29 1:28 Carl Love via Gdb-patches
2022-04-29 9:14 ` Lancelot SIX via Gdb-patches
2022-04-29 15:48 ` Carl Love via Gdb-patches
2022-04-29 16:45 ` Bruno Larsen via Gdb-patches
2022-04-29 16:57 ` Pedro Alves
2022-04-29 17:09 ` Keith Seitz via Gdb-patches
2022-04-29 17:20 ` Pedro Alves
2022-04-29 17:26 ` Pedro Alves
2022-04-29 18:40 ` Pedro Alves
2022-04-29 19:13 ` Carl Love via Gdb-patches
2022-04-30 0:56 ` [PATCH] Fix "b func(std::string)", use DMGL_VERBOSE (was: Re: [PATCH] Fix gdb.cp/no-dmgl-verbose.exp test) Pedro Alves
2022-04-30 2:54 ` Carl Love via Gdb-patches
2022-04-30 21:11 ` Lancelot SIX via Gdb-patches
2022-05-02 15:46 ` Pedro Alves
2022-05-05 18:53 ` Pedro Alves
2022-04-30 1:00 ` Pedro Alves [this message]
2022-04-29 17:23 ` [PATCH] Fix gdb.cp/no-dmgl-verbose.exp test Lancelot SIX via Gdb-patches
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=5a976d0c-ebeb-300e-bd63-437bcddebe93@palves.net \
--to=pedro@palves.net \
--cc=Ulrich.Weigand@de.ibm.com \
--cc=cel@us.ibm.com \
--cc=gdb-patches@sourceware.org \
--cc=keiths@redhat.com \
--cc=lsix@lancelotsix.com \
--cc=rogealve@br.ibm.com \
/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