From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 79754 invoked by alias); 12 May 2016 12:50: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 79681 invoked by uid 89); 12 May 2016 12:50:38 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=HX-Received:10.66.254.1 X-HELO: mail-pa0-f54.google.com Received: from mail-pa0-f54.google.com (HELO mail-pa0-f54.google.com) (209.85.220.54) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Thu, 12 May 2016 12:50:37 +0000 Received: by mail-pa0-f54.google.com with SMTP id xk12so29540677pac.0 for ; Thu, 12 May 2016 05:50:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=KXl1n160ZQcBTr6s1DQAH/+FrNM9CUiyEaPLryRecFE=; b=biSBbwgK2FQ86ZUgF7m5RGwsoPFp4RRktRtB2Yu6C95A6xCwuVNaUUMjnGLyrdVnYC CeV3hpEh/T07AB6J5rNrjqYI0JzIHwj3+/v61VvGvq8loJJUCcu36uMIdhKnWC9A0tmK aPiln1RGak2Sba8s21cwIXDPbeyqHy3G0iaW4H6aovLiTAIFr9JBg1pb/IRzmseXprZt SiDHsN8RXBLteRlwxabU9gKQijaoEbOCiM4Z97uDLPcb0kljWmLyV4Wz1Ab4pQRre5xp A0k/QFZfc8HD8xX7c13M4E2Ai5Tplxr772nkiptUHQ2nd2uBl/eBrYdXq9ytY60eTRBK jxWg== X-Gm-Message-State: AOPr4FUsduntU2jaUC02dYjjPLPHJRKaTMNW2CBIgzBFonI+TEn/6gzz3g/2F8h+vDppPg== X-Received: by 10.66.254.1 with SMTP id ae1mr13690896pad.32.1463057435603; Thu, 12 May 2016 05:50:35 -0700 (PDT) Received: from E107787-LIN (gcc113.osuosl.org. [140.211.9.71]) by smtp.gmail.com with ESMTPSA id a14sm19774716pfc.57.2016.05.12.05.50.33 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Thu, 12 May 2016 05:50:34 -0700 (PDT) From: Yao Qi To: Jim Chen Cc: gdb-patches@sourceware.org Subject: Re: [PATCH] Specify python2 or python3 as Python program name References: <1463003507-13094-1-git-send-email-nchen@mozilla.com> Date: Thu, 12 May 2016 12:50:00 -0000 In-Reply-To: <1463003507-13094-1-git-send-email-nchen@mozilla.com> (Jim Chen's message of "Wed, 11 May 2016 17:51:46 -0400") Message-ID: <867fezcueh.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2016-05/txt/msg00194.txt.bz2 Jim Chen writes: > When initializing Python, GDB hard codes the Python program name to > $prefix/bin/python, where $prefix is /usr for example. On some > platforms, /usr/bin/python points to python3. So what happens is, even > if GDB is built with python2 support, GDB ends up setting the Python > program name to point to python3, causing a mismatch. I think it's I agree that is a problem ... > better to deliberately specify python2 or python3. ... but I don't think your patch is the right fix. What we can do in GDB is probably emit an error if the $prefix/bin/python is incompatible to the python we build gdb against. --=20 Yao (=E9=BD=90=E5=B0=A7)