From: Simon Marchi <simon.marchi@polymtl.ca>
To: Jason Vas Dias <jason.vas.dias@gmail.com>
Cc: gdb@sourceware.org
Subject: Re: 'b ::new' causes gdb 8.1 to coredump ?
Date: Mon, 23 Apr 2018 00:59:00 -0000 [thread overview]
Message-ID: <744f8b73dc6a36943fb21322c61849f1@polymtl.ca> (raw)
In-Reply-To: <zi1ws2eu.fsf@gmail.com>
On 2018-04-21 16:57, Jason Vas Dias wrote:
> Aha! It was the '::' namespace colons!
>
> (gdb) b "operator new(std::size_t)"
> Breakpoint 2 at 0x155554c30680: file
> ../../../../gcc-gcc-7-branch/libstdc++-v3/libsupc++/new_op.cc, line
> 43.
> (gdb) q
>
>
> But I don't think the presence or absence of leading global namespace
> '::' colons should cause GDB to coredump or fail to resolve operator
> new() .
>
> Doesn't GDB understand C++ namespaces ?
GDB does understand namespaces, just try "b std::string::find" for
example.
Maybe it's my knowledge of C++ that is lacking, but I don't think
'operator ::new' is right. It would be like writing 'operator ::+'. So
(gdb) b 'operator new'
sounds right to me. This:
(gdb) b '::operator new'
should probably work too (not sure), since you could have other
operators in namespaces (foo::operator==(hello&, hello&)), but it also
hits the assert. In any case, no input should ever hit an assert, so
it's still a bug (it should be cleanly rejected).
Simon
prev parent reply other threads:[~2018-04-21 22:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-21 20:57 Jason Vas Dias
2018-04-21 22:52 ` Jason Vas Dias
2018-04-23 0:59 ` Simon Marchi [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=744f8b73dc6a36943fb21322c61849f1@polymtl.ca \
--to=simon.marchi@polymtl.ca \
--cc=gdb@sourceware.org \
--cc=jason.vas.dias@gmail.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