diff options
author | Keith Seitz <keiths@redhat.com> | 2018-08-10 10:45:36 -0700 |
---|---|---|
committer | Keith Seitz <keiths@redhat.com> | 2018-08-10 11:14:25 -0700 |
commit | 18cdc6d8f8e8b55e84783e0a2b5a80b41a0e917b (patch) | |
tree | 4cb360c4b831deaaa79333ebc6b3a28a634465bc /gdb/Makefile.in | |
parent | b7dc48b4a8006abb552c5e7d22f9841c86f2537d (diff) | |
download | fsf-binutils-gdb-18cdc6d8f8e8b55e84783e0a2b5a80b41a0e917b.zip fsf-binutils-gdb-18cdc6d8f8e8b55e84783e0a2b5a80b41a0e917b.tar.gz fsf-binutils-gdb-18cdc6d8f8e8b55e84783e0a2b5a80b41a0e917b.tar.bz2 |
Add a C++ wrapper for GCC C plug-in
This patch introduces a new class which wraps the GCC C compile plug-in.
It is a little unfortunate that this all happened in between the time that
GCC moved to C++ and GDB moved to C++, leaving us with an ABI promise to
support a C-like interface. The hope is to isolate GDB from some of this
should it change in the future.
Broadly, what this does is replace calls like:
C_CTX (context)->c_ops->operation (C_CTX (context), ...);
with calls that now look like:
context->c_plugin->operation (...);
This API will be further refined in following patches when struct
compile_instance/compile_c_instance are changed into classes.
gdb/ChangeLog:
* Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
* compile/compile-c-types.c: Define GCC_METHODN macros and include
gcc-c-fe.def to define C plugin.
(delete_instance): Delete `c_plugin'.
(new_compile_instance): Initialize `c_plugin'.
* compile/compile-c.h: Include gcc_c_plugin.h.
(struct compile_c_instance) <c_plugin>: New member.
* gcc-c-plugin.h: New file.
Update all callers with API change.
Diffstat (limited to 'gdb/Makefile.in')
-rw-r--r-- | gdb/Makefile.in | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/gdb/Makefile.in b/gdb/Makefile.in index f9d1b00..118c3c8 100644 --- a/gdb/Makefile.in +++ b/gdb/Makefile.in @@ -1464,6 +1464,7 @@ HFILES_NO_SRCDIR = \ compile/compile-internal.h \ compile/compile-object-load.h \ compile/compile-object-run.h \ + compile/gcc-c-plugin.h \ config/nm-linux.h \ config/nm-nto.h \ config/djgpp/langinfo.h \ |