[PATCH 0/9] C++ Support for Compile

Keith Seitz
2018-08-10T23:25:39Z

This series of patches implements basic C++ compile support.

The series includes a handful of linespec.c cleanups and a small linespec
API change and addition. I've discussed those changes in the patches.

C++ compile support started largely as a cut-n-paste of the original C
compile work done by Jan Kratochvil, Phil Muldoon, and Tom Tromey, so I'd
like to "send a shout out" to those guys for their pioneering (for GDB)
effort. Thank you, Jan, Phil, and Tom!

I want to stress that this support is quite experimental and likely has some
problems -- maybe even a lot of problems. Nonetheless, the code is usable.
Support is quite incomplete, but I've already made inroads into many missing
features. These will be submitted in the near future.

Despite the (many) shortcomings, I am submitting this upstream in an attempt
to widen exposure and open further development of this feature to other
interested parties.

Keith Seitz (9):
Change `file_symtabs' to std::vector
Change `function_symbols' to std::vector
Change `label_symbols' to std::vector in linespec.c structures
Change `minimal_symbols' to std::vector in linespec.c structures
Change decode_compound_collector to use std::vector
Remove VEC definitions from linespec.c
Use block_symbol_d in linespec APIs
Add new search_symbols_multiple API
C++ compile support

gdb/ChangeLog | 115 ++
gdb/Makefile.in | 5 +
gdb/NEWS | 14 +
gdb/ada-lang.c | 2 +-
gdb/c-lang.c | 4 +-
gdb/c-lang.h | 19 +
gdb/compile/compile-c-support.c | 205 ++-
gdb/compile/compile-cplus-support.c | 30 +
gdb/compile/compile-cplus-symbols.c | 511 +++++++
gdb/compile/compile-cplus-types.c | 1430 ++++++++++++++++++++
gdb/compile/compile-cplus.h | 207 +++
gdb/compile/compile-internal.h | 8 +
gdb/compile/compile-object-load.c | 7 +-
gdb/compile/compile.c | 1 -
gdb/compile/gcc-cp-plugin.h | 85 ++
gdb/doc/ChangeLog | 5 +
gdb/doc/gdb.texinfo | 20 +
gdb/linespec.c | 553 ++++----
gdb/symtab.c | 4 +-
gdb/symtab.h | 45 +-
gdb/testsuite/ChangeLog | 25 +
.../gdb.compile/compile-cplus-anonymous.cc | 76 ++
.../gdb.compile/compile-cplus-anonymous.exp | 64 +
.../gdb.compile/compile-cplus-array-decay.cc | 31 +
.../gdb.compile/compile-cplus-array-decay.exp | 50 +
gdb/testsuite/gdb.compile/compile-cplus-inherit.cc | 58 +
.../gdb.compile/compile-cplus-inherit.exp | 53 +
gdb/testsuite/gdb.compile/compile-cplus-member.cc | 83 ++
gdb/testsuite/gdb.compile/compile-cplus-member.exp | 77 ++
gdb/testsuite/gdb.compile/compile-cplus-method.cc | 91 ++
gdb/testsuite/gdb.compile/compile-cplus-method.exp | 67 +
gdb/testsuite/gdb.compile/compile-cplus-mod.c | 28 +
.../gdb.compile/compile-cplus-namespace.cc | 52 +
.../gdb.compile/compile-cplus-namespace.exp | 51 +
gdb/testsuite/gdb.compile/compile-cplus-nested.cc | 58 +
gdb/testsuite/gdb.compile/compile-cplus-nested.exp | 53 +
gdb/testsuite/gdb.compile/compile-cplus-print.c | 32 +
gdb/testsuite/gdb.compile/compile-cplus-print.exp | 81 ++
gdb/testsuite/gdb.compile/compile-cplus-virtual.cc | 54 +
.../gdb.compile/compile-cplus-virtual.exp | 71 +
gdb/testsuite/gdb.compile/compile-cplus.c | 241 ++++
gdb/testsuite/gdb.compile/compile-cplus.exp | 341 +++++
gdb/testsuite/lib/compile-support.exp | 227 ++++
43 files changed, 4920 insertions(+), 314 deletions(-)
create mode 100644 gdb/compile/compile-cplus-support.c
create mode 100644 gdb/compile/compile-cplus-symbols.c
create mode 100644 gdb/compile/compile-cplus-types.c
create mode 100644 gdb/compile/compile-cplus.h
create mode 100644 gdb/compile/gcc-cp-plugin.h
create mode 100644 gdb/testsuite/gdb.compile/compile-cplus-anonymous.cc
create mode 100644 gdb/testsuite/gdb.compile/compile-cplus-anonymous.exp
create mode 100644 gdb/testsuite/gdb.compile/compile-cplus-array-decay.cc
create mode 100644 gdb/testsuite/gdb.compile/compile-cplus-array-decay.exp
create mode 100644 gdb/testsuite/gdb.compile/compile-cplus-inherit.cc
create mode 100644 gdb/testsuite/gdb.compile/compile-cplus-inherit.exp
create mode 100644 gdb/testsuite/gdb.compile/compile-cplus-member.cc
create mode 100644 gdb/testsuite/gdb.compile/compile-cplus-member.exp
create mode 100644 gdb/testsuite/gdb.compile/compile-cplus-method.cc
create mode 100644 gdb/testsuite/gdb.compile/compile-cplus-method.exp
create mode 100644 gdb/testsuite/gdb.compile/compile-cplus-mod.c
create mode 100644 gdb/testsuite/gdb.compile/compile-cplus-namespace.cc
create mode 100644 gdb/testsuite/gdb.compile/compile-cplus-namespace.exp
create mode 100644 gdb/testsuite/gdb.compile/compile-cplus-nested.cc
create mode 100644 gdb/testsuite/gdb.compile/compile-cplus-nested.exp
create mode 100644 gdb/testsuite/gdb.compile/compile-cplus-print.c
create mode 100644 gdb/testsuite/gdb.compile/compile-cplus-print.exp
create mode 100644 gdb/testsuite/gdb.compile/compile-cplus-virtual.cc
create mode 100644 gdb/testsuite/gdb.compile/compile-cplus-virtual.exp
create mode 100644 gdb/testsuite/gdb.compile/compile-cplus.c
create mode 100644 gdb/testsuite/gdb.compile/compile-cplus.exp
create mode 100644 gdb/testsuite/lib/compile-support.exp

--
2.13.6