From patchwork Sat Nov 1 21:45:52 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kratochvil X-Patchwork-Id: 3539 Received: (qmail 23741 invoked by alias); 1 Nov 2014 21:45:57 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 23731 invoked by uid 89); 1 Nov 2014 21:45:56 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-4.3 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD, SPF_HELO_PASS, SPF_PASS autolearn=ham version=3.3.2 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 (AES256-GCM-SHA384 encrypted) ESMTPS; Sat, 01 Nov 2014 21:45:55 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id sA1Ljsa3003841 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Sat, 1 Nov 2014 17:45:54 -0400 Received: from host1.jankratochvil.net (ovpn-116-27.ams2.redhat.com [10.36.116.27]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id sA1LjrVv019128 for ; Sat, 1 Nov 2014 17:45:53 -0400 Subject: [PATCH v3 00/14] let gdb reuse gcc's C compiler From: Jan Kratochvil To: gdb-patches@sourceware.org Date: Sat, 01 Nov 2014 22:45:52 +0100 Message-ID: <20141101214552.13230.45564.stgit@host1.jankratochvil.net> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-IsSubscribed: yes Hi, https://github.com/tromey/gdb.git submit/compile This is version 3 of the patch to let gdb reuse gcc's C compiler. Version 2 is here: https://sourceware.org/ml/gdb-patches/2014-06/msg00758.html New in version 3: * x86_64 in -m32 mode testsuite run was failing: (gdb) compile code -- ; Could not find a compiler matching "^i.86-[^-]*-linux(-gnu)?-gcc$" Therefore applied the patch included below. * Rename dwarf_expr_frame_base_1 -> func_get_frame_base_dwarf_block: https://sourceware.org/ml/gdb-patches/2014-10/msg00158.html * doc updates: https://sourceware.org/ml/gdb-patches/2014-10/msg00164.html Built and regtested on x86-64, x86_64-m32 and i686 Fedora 21pre in linux-nat and gdbserver modes. Going to check it in in a week as v2 has been posted by global maintainer Tom Tromey and there has already been enough time for its reviews. Thanks, Jan diff --git a/gdb/amd64-tdep.c b/gdb/amd64-tdep.c index ca61b1b..ed41f88 100644 --- a/gdb/amd64-tdep.c +++ b/gdb/amd64-tdep.c @@ -2914,14 +2914,6 @@ static const int amd64_record_regmap[] = AMD64_DS_REGNUM, AMD64_ES_REGNUM, AMD64_FS_REGNUM, AMD64_GS_REGNUM }; -/* gdbarch gnu_triplet_regexp method. */ - -static const char * -amd64_gnu_triplet_regexp (struct gdbarch *gdbarch) -{ - return "x86_64"; -} - void amd64_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch) { @@ -3071,8 +3063,6 @@ amd64_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch) set_gdbarch_insn_is_call (gdbarch, amd64_insn_is_call); set_gdbarch_insn_is_ret (gdbarch, amd64_insn_is_ret); set_gdbarch_insn_is_jump (gdbarch, amd64_insn_is_jump); - - set_gdbarch_gnu_triplet_regexp (gdbarch, amd64_gnu_triplet_regexp); } diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c index 4a59560..56bfd49 100644 --- a/gdb/i386-tdep.c +++ b/gdb/i386-tdep.c @@ -4305,12 +4305,13 @@ i386_stap_parse_special_token (struct gdbarch *gdbarch, -/* gdbarch gnu_triplet_regexp method. */ +/* gdbarch gnu_triplet_regexp method. Both arches are acceptable as GDB always + also supplies -m64 or -m32 by gdbarch_gcc_target_options. */ static const char * i386_gnu_triplet_regexp (struct gdbarch *gdbarch) { - return "i.86"; + return "(x86_64|i.86)"; }