From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 50211 invoked by alias); 10 Aug 2018 23:25:39 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 50196 invoked by uid 89); 10 Aug 2018 23:25:38 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-11.9 required=5.0 tests=BAYES_00,GIT_PATCH_2,GIT_PATCH_3,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=parties, exposure, vec, phil X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 10 Aug 2018 23:25:36 +0000 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 405E6308FB8B for ; Fri, 10 Aug 2018 23:25:35 +0000 (UTC) Received: from theo.uglyboxes.com (ovpn04.gateway.prod.ext.phx2.redhat.com [10.5.9.4]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0A5035429B for ; Fri, 10 Aug 2018 23:25:34 +0000 (UTC) From: Keith Seitz To: gdb-patches@sourceware.org Subject: [PATCH 0/9] C++ Support for Compile Date: Fri, 10 Aug 2018 23:25:00 -0000 Message-Id: <20180810232534.481-1-keiths@redhat.com> X-IsSubscribed: yes X-SW-Source: 2018-08/txt/msg00304.txt.bz2 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