From: Simon Marchi <simon.marchi@polymtl.ca>
To: Keith Seitz <keiths@redhat.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH 9/9] C++ compile support
Date: Tue, 23 Mar 2021 21:04:09 -0400 [thread overview]
Message-ID: <e56af935-5487-b051-0550-c1d0e8b9c47e@polymtl.ca> (raw)
In-Reply-To: <20180810232534.481-10-keiths@redhat.com>
Hi Keith,
I am from the past...
On 2018-08-10 7:25 p.m., Keith Seitz wrote:
> +/* Convert a struct or union type to its gcc representation. If this type
> + was defined in another type, NESTED_ACCESS should indicate the
> + accessibility of this type. */
> +
> +static gcc_type
> +compile_cplus_convert_struct_or_union (compile_cplus_instance *instance,
> + struct type *type,
> + enum gcc_cp_symbol_kind nested_access)
> +{
> + const char *filename = nullptr;
> + unsigned short line = 0;
> +
> + /* Get the decl name of this type. */
> + gdb::unique_xmalloc_ptr<char> name = decl_name (TYPE_NAME (type));
> +
> + /* Create a new scope for TYPE. */
> + compile_scope scope = instance->new_scope (TYPE_NAME (type), type);
> +
> + if (scope.nested_type () != GCC_TYPE_NONE)
> + {
> + /* The type requested was actually defined inside another type,
> + such as a nested class definition. Return that type. */
> + return scope.nested_type ();
> + }
> +
> + /* Push all scopes. */
> + instance->enter_scope (scope);
> +
> + /* First we create the resulting type and enter it into our hash
> + table. This lets recursive types work. */
> +
> + gcc_decl resuld;
> + if (TYPE_CODE (type) == TYPE_CODE_STRUCT)
> + {
> + const char *what = TYPE_DECLARED_CLASS (type) ? "struct" : "class";
I don't know if this matters, but the condition above looks reversed,
can you confirm?
Simon
next prev parent reply other threads:[~2021-03-24 1:04 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-10 23:25 [PATCH 0/9] C++ Support for Compile Keith Seitz
2018-08-10 23:25 ` [PATCH 2/9] Change `function_symbols' to std::vector Keith Seitz
2018-08-11 14:49 ` Tom Tromey
2018-08-17 17:59 ` Keith Seitz
2018-08-28 17:43 ` Tom Tromey
2018-08-10 23:25 ` [PATCH 1/9] Change `file_symtabs' " Keith Seitz
2018-08-11 14:47 ` Tom Tromey
2018-08-17 17:56 ` Keith Seitz
2018-08-28 17:30 ` Tom Tromey
2018-08-10 23:25 ` [PATCH 3/9] Change `label_symbols' to std::vector in linespec.c structures Keith Seitz
2018-08-11 14:50 ` Tom Tromey
2018-08-10 23:31 ` [PATCH 6/9] Remove VEC definitions from linespec.c Keith Seitz
2018-08-11 15:03 ` Tom Tromey
2018-08-10 23:31 ` [PATCH 7/9] Use block_symbol_d in linespec APIs Keith Seitz
2018-08-11 15:05 ` Tom Tromey
2018-08-17 18:04 ` Keith Seitz
2018-08-10 23:32 ` [PATCH 4/9] Change `minimal_symbols' to std::vector in linespec.c structures Keith Seitz
2018-08-11 15:01 ` Tom Tromey
2018-08-17 18:00 ` Keith Seitz
2018-08-28 17:44 ` Tom Tromey
2018-08-10 23:32 ` [PATCH 5/9] Change decode_compound_collector to use std::vector Keith Seitz
2018-08-11 15:02 ` Tom Tromey
2018-08-17 18:04 ` Keith Seitz
2018-08-20 1:20 ` Simon Marchi
2018-08-20 13:28 ` Tom Tromey
2018-08-20 14:03 ` Simon Marchi
2018-08-28 17:46 ` Tom Tromey
2018-08-10 23:32 ` [PATCH 9/9] C++ compile support Keith Seitz
2018-08-11 7:22 ` Eli Zaretskii
2018-08-17 17:51 ` Keith Seitz
2018-08-17 18:57 ` Eli Zaretskii
2018-08-20 17:02 ` Keith Seitz
2018-08-12 0:17 ` Tom Tromey
2018-08-17 18:26 ` Keith Seitz
2018-08-28 17:52 ` Tom Tromey
2018-08-29 22:32 ` Keith Seitz
2021-03-24 1:04 ` Simon Marchi [this message]
2021-03-24 14:51 ` Keith Seitz
2021-03-24 15:06 ` Simon Marchi
2021-03-24 20:49 ` Keith Seitz
2021-04-01 18:03 ` Tom Tromey
2021-04-01 18:07 ` Luis Machado
2021-04-01 19:36 ` Keith Seitz
2018-08-10 23:34 ` [PATCH 8/9] Add new search_symbols_multiple API Keith Seitz
2018-08-11 20:49 ` Tom Tromey
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=e56af935-5487-b051-0550-c1d0e8b9c47e@polymtl.ca \
--to=simon.marchi@polymtl.ca \
--cc=gdb-patches@sourceware.org \
--cc=keiths@redhat.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).