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  <t...@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 via email to