From: Paul Koning <paulkoning@comcast.net>
To: psmith@gnu.org
Cc: gdb@sourceware.org
Subject: Re: Types prefixed by "class" or "struct" string??
Date: Fri, 21 Feb 2020 14:55:00 -0000 [thread overview]
Message-ID: <BDB5F1E4-3BEC-4850-AFEE-6DE6EFCE8733@comcast.net> (raw)
In-Reply-To: <ff0ffe8750fdd20fa6fd20127d28d8aa60cd68ad.camel@gnu.org>
> On Feb 21, 2020, at 9:48 AM, Paul Smith <psmith@gnu.org> wrote:
>
> ...
> If I try to look up a type without the "class " prefix it works fine:
>
> (gdb) python
>> t = gdb.lookup_type('std::__cxx11::list<Object::Pending, std::allocator<Object::Pending> >::_Node')
>> print str(t)
>> ^D
> std::__cxx11::list<Object::Pending, std::allocator<Object::Pending> >::_Node
>
> But, if I try to look up the type including the "class " it definitely
> fails:
Well, sure. "class" is not part of the name of the type.
Also note that class and struct are basically synonyms, the only difference is whether the default access is private (class) or public (struct). While by tradition "struct" is used when defining "plain old data" that is not a requirement.
paul
next prev parent reply other threads:[~2020-02-21 14:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-21 14:48 Paul Smith
2020-02-21 14:55 ` Paul Koning [this message]
2020-02-21 18:16 ` Paul Smith
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=BDB5F1E4-3BEC-4850-AFEE-6DE6EFCE8733@comcast.net \
--to=paulkoning@comcast.net \
--cc=gdb@sourceware.org \
--cc=psmith@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