18cdc6d8f8
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. |
||
---|---|---|
.. | ||
compile-c-support.c | ||
compile-c-symbols.c | ||
compile-c-types.c | ||
compile-c.h | ||
compile-internal.h | ||
compile-loc2c.c | ||
compile-object-load.c | ||
compile-object-load.h | ||
compile-object-run.c | ||
compile-object-run.h | ||
compile.c | ||
compile.h | ||
gcc-c-plugin.h |