From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 115781 invoked by alias); 4 Jan 2016 13:38:26 -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 115769 invoked by uid 89); 4 Jan 2016 13:38:26 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=sk:python-, sk:python 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; Mon, 04 Jan 2016 13:38:25 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (Postfix) with ESMTPS id 32E658CF57; Mon, 4 Jan 2016 13:38:24 +0000 (UTC) Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u04DcMjO021780; Mon, 4 Jan 2016 08:38:23 -0500 Message-ID: <568A75CE.1010007@redhat.com> Date: Mon, 04 Jan 2016 13:38:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Mike Frysinger , gdb-patches@sourceware.org Subject: Re: [PATCH] gdb: sim: disable integration w/some multitarget configs [PR sim/13418] References: <1451724153-23316-1-git-send-email-vapier@gentoo.org> In-Reply-To: <1451724153-23316-1-git-send-email-vapier@gentoo.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SW-Source: 2016-01/txt/msg00035.txt.bz2 On 01/02/2016 08:42 AM, Mike Frysinger wrote: > Multitarget builds currently fail when: > (1) simulator support is enabled > (2) powerpc is included in the target list > (3) powerpc is not the main/default target > > This is because the powerpc sim provides a non-standard API function > sim_spr_register_name which the powerpc gdb utilizes. Since the sim > does not yet support multitarget, only the sim for the main target > (if one exists) is built. When that target isn't powerpc, this func > is not available leading to linking errors. > > Since multitarget support is going to take a while, and specifically > the powerpc target is going to take even longer, disable sim support > automatically when the aforementioned conditions are met. > diff --git a/gdb/configure.ac b/gdb/configure.ac > index 5b618c9..458605f 100644 > --- a/gdb/configure.ac > +++ b/gdb/configure.ac > @@ -2256,6 +2256,19 @@ fi > SIM= > SIM_OBS= > if test "${ignore_sim}" = "false"; then > + # The ppc gdb/sim only works when it's the main target. PR sim/13418 > + case $target in > + powerpc*-*-*) ;; > + *) > + case "${all_targets}: ${TARGET_OBS} " in > + true:*|*" rs6000-tdep.o "*) > + AC_MSG_WARN([Disabling sim integration for multitarget powerpc configs]) > + gdb_sim= > + ;; > + esac > + ;; > + esac > + Now sure about that. It penalizes non-PPC sims for a PPC sim issue. How about this instead? >From e05ef2bec1b3843c87dd06a7680f7d6e1c13ba1e Mon Sep 17 00:00:00 2001 From: Pedro Alves Date: Mon, 4 Jan 2016 13:01:25 +0000 Subject: [PATCH] ppc sim --- gdb/config.in | 3 +++ gdb/configure | 10 ++++++++++ gdb/configure.ac | 8 ++++++++ gdb/rs6000-tdep.c | 2 +- 4 files changed, 22 insertions(+), 1 deletion(-) diff --git a/gdb/config.in b/gdb/config.in index ccc0098..6196fa0 100644 --- a/gdb/config.in +++ b/gdb/config.in @@ -758,6 +758,9 @@ when building for Cygwin. */ #undef USE_WIN32API +/* Define if the PPC simulator is being linked in. */ +#undef WITH_PPC_SIM + /* Define if --with-python provides a path, either directly or via python-config.py --exec-prefix. */ #undef WITH_PYTHON_PATH diff --git a/gdb/configure b/gdb/configure index 5afdbbc..15383d6 100755 --- a/gdb/configure +++ b/gdb/configure @@ -15846,6 +15846,16 @@ if test "${ignore_sim}" = "false"; then $as_echo "#define WITH_SIM 1" >>confdefs.h + + # Some tdep code should only be compiled in when the ppc sim is + # built. PR sim/13418. + case $target in + powerpc*-*-*) + +$as_echo "#define WITH_PPC_SIM 1" >>confdefs.h + + ;; + esac fi fi diff --git a/gdb/configure.ac b/gdb/configure.ac index 5b618c9..d102640 100644 --- a/gdb/configure.ac +++ b/gdb/configure.ac @@ -2260,6 +2260,14 @@ if test "${ignore_sim}" = "false"; then SIM="${gdb_sim}" SIM_OBS="remote-sim.o" AC_DEFINE(WITH_SIM, 1, [Define if the simulator is being linked in.]) + + # Some tdep code should only be compiled in when the ppc sim is + # built. PR sim/13418. + case $target in + powerpc*-*-*) + AC_DEFINE(WITH_PPC_SIM, 1, [Define if the PPC simulator is being linked in.]) + ;; + esac fi fi AC_SUBST(SIM) diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c index 47b0749..599b076 100644 --- a/gdb/rs6000-tdep.c +++ b/gdb/rs6000-tdep.c @@ -328,7 +328,7 @@ init_sim_regno_table (struct gdbarch *arch) set_sim_regno (sim_regno, tdep->ppc_acc_regnum, sim_ppc_acc_regnum); /* spefscr is a special-purpose register, so the code below handles it. */ -#ifdef WITH_SIM +#ifdef WITH_PPC_SIM /* Now handle all special-purpose registers. Verify that they haven't mistakenly been assigned numbers by any of the above code. */ -- 1.9.3