This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Specify python2 or python3 as Python program name
- From: Yao Qi <qiyaoltc at gmail dot com>
- To: Jim Chen <nchen at mozilla dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Thu, 12 May 2016 13:50:30 +0100
- Subject: Re: [PATCH] Specify python2 or python3 as Python program name
- Authentication-results: sourceware.org; auth=none
- References: <1463003507-13094-1-git-send-email-nchen at mozilla dot com>
Jim Chen <nchen@mozilla.com> 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.
--
Yao (éå)