public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jeff Law <jeffreyalaw@gmail.com>
To: Tom Tromey <tom@tromey.com>, gcc-patches@gcc.gnu.org
Subject: Re: [PATCH v2 17/21] libcc1: share the GCC interface code
Date: Fri, 30 Apr 2021 09:07:47 -0600	[thread overview]
Message-ID: <cd25cf43-3930-2bba-4ed8-365236f7d305@gmail.com> (raw)
In-Reply-To: <20210428010119.806184-18-tom@tromey.com>


On 4/27/2021 7:01 PM, Tom Tromey wrote:
> Both the C and C++ side of the GDB plugin in libcc1 share a lot of
> code relating to the base GCC interface.  It was all copy-and-pasted,
> but is essentially identical between the two.  This is by design, as
> the base GCC API is intended to be shared.
>
> This patch merges the implementations into base_gdb_plugin, which was
> introduced earlier for this purpose.
>
> libcc1/ChangeLog
> 2021-04-27  Tom Tromey  <tom@tromey.com>
>
> 	* libcp1.cc (libcp1): Change parameters.  Update.
> 	(libcp1_set_verbose, libcp1_set_arguments)
> 	(libcp1_set_triplet_regexp, libcp1_set_driver_filename)
> 	(libcp1_set_source_file, libcp1_set_print_callback, fork_exec)
> 	(libcp1_compile, libcp1_destroy, vtable): Remove.
> 	(libcp1::add_callbacks): New method, extracted from
> 	libcp1_compile.
> 	(gcc_c_fe_context): Update.
> 	* libcc1.cc (libcc1): Change parameters.  Update.
> 	(libcc1_set_verbose, libcc1_set_arguments)
> 	(libcc1_set_triplet_regexp, libcc1_set_driver_filename)
> 	(libcc1_set_source_file, libcc1_set_print_callback, fork_exec)
> 	(libcc1_compile, libcc1_destroy, vtable): Remove.
> 	(libcc1::add_callbacks): New method, extracted from
> 	libcc1_compile.
> 	(gcc_c_fe_context): Update.
> 	* gdbctx.hh (base_gdb_plugin): Change parameters.
> 	(~base_gdb_plugin): New.
> 	<add_callbacks>: New virtual method.
> 	<plugin_name, fe_version, compiler_name, vtable>: New members.
> 	(get_self, do_set_verbose, do_set_arguments)
> 	(do_set_triplet_regexp, do_set_driver_filename)
> 	(do_set_arguments_v0, do_set_source_file, do_set_print_callback)
> 	(fork_exec, do_compile, do_compile_v0, do_destroy): New methods.

OK

Jeff

  reply	other threads:[~2021-04-30 15:07 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-28  1:00 [PATCH v2 00/21] C++11-based improvements for libcc1 Tom Tromey
2021-04-28  1:00 ` [PATCH v2 01/21] libcc1: use templates to unmarshall enums Tom Tromey
2021-04-28 18:27   ` Jeff Law
2021-04-28  1:01 ` [PATCH v2 02/21] libcc1: use "override" Tom Tromey
2021-04-28 15:53   ` Jeff Law
2021-04-28  1:01 ` [PATCH v2 03/21] libcc1: inline some simple methods Tom Tromey
2021-04-28 15:54   ` Jeff Law
2021-04-28  1:01 ` [PATCH v2 04/21] libcc1: delete copy constructor and assignment operators Tom Tromey
2021-04-28 15:55   ` Jeff Law
2021-04-28  1:01 ` [PATCH v2 05/21] libcc1: use variadic templates for "call" Tom Tromey
2021-04-28 18:28   ` Jeff Law
2021-04-28  1:01 ` [PATCH v2 06/21] libcc1: use variadic templates for "rpc" Tom Tromey
2021-04-28 18:28   ` Jeff Law
2021-04-28  1:01 ` [PATCH v2 07/21] libcc1: use std::vector when building function types Tom Tromey
2021-04-28 16:01   ` Jeff Law
2021-04-28 19:56     ` Tom Tromey
2021-04-28 20:07       ` Jeff Law
2021-04-28  1:01 ` [PATCH v2 08/21] libcc1: add deleter objects Tom Tromey
2021-04-28 21:06   ` Jeff Law
2021-04-28  1:01 ` [PATCH v2 09/21] libcc1: add more uses of 'deleter' Tom Tromey
2021-04-29 12:43   ` Jeff Law
2021-04-28  1:01 ` [PATCH v2 10/21] libcc1: use unique_ptr more Tom Tromey
2021-04-29 12:44   ` Jeff Law
2021-04-28  1:01 ` [PATCH v2 11/21] libcc1: unify compiler handling Tom Tromey
2021-04-29 12:47   ` Jeff Law
2021-04-28  1:01 ` [PATCH v2 12/21] libcc1: use foreach Tom Tromey
2021-04-28 16:04   ` Jeff Law
2021-04-28  1:01 ` [PATCH v2 13/21] libcc1: use static_assert Tom Tromey
2021-04-28 16:06   ` Jeff Law
2021-04-28  1:01 ` [PATCH v2 14/21] libcc1: share basic context code Tom Tromey
2021-04-29 12:50   ` Jeff Law
2021-04-28  1:01 ` [PATCH v2 15/21] libcc1: share GDB plugin code Tom Tromey
2021-04-30 14:50   ` Jeff Law
2021-04-28  1:01 ` [PATCH v2 16/21] libcc1: use GCC_FE_VERSION_1 in C++ plugin Tom Tromey
2021-04-28 16:06   ` Jeff Law
2021-04-28  1:01 ` [PATCH v2 17/21] libcc1: share the GCC interface code Tom Tromey
2021-04-30 15:07   ` Jeff Law [this message]
2021-04-28  1:01 ` [PATCH v2 18/21] libcc1: fix a memory leak Tom Tromey
2021-04-28 16:07   ` Jeff Law
2021-04-28  1:01 ` [PATCH v2 19/21] libcc1: use variadic templates for callbacks Tom Tromey
2021-04-30 15:08   ` Jeff Law
2021-05-04 22:05     ` Tom Tromey
2021-04-28  1:01 ` [PATCH v2 20/21] libcc1: avoid extra string copies Tom Tromey
2021-04-28 16:07   ` Jeff Law
2021-04-28  1:01 ` [PATCH v2 21/21] libcc1: avoid a call to c_str Tom Tromey
2021-04-28 16:08   ` Jeff Law

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=cd25cf43-3930-2bba-4ed8-365236f7d305@gmail.com \
    --to=jeffreyalaw@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=tom@tromey.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).