This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] Don't install gdb.PYTHONDIR if -nx
- From: Daniel Jacobowitz <dan at codesourcery dot com>
- To: Doug Evans <dje at google dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Mon, 29 Nov 2010 23:22:09 -0500
- Subject: Re: [RFA] Don't install gdb.PYTHONDIR if -nx
- References: <20101129003949.502FC246199@ruffy.mtv.corp.google.com>
On Sun, Nov 28, 2010 at 04:39:49PM -0800, Doug Evans wrote:
> Hi.
>
> I was testing a change to gdb/command/pretty_printers.py
> and was tripping over the fact that gdb was picking up
> the installed copies.
> The testsuite loads the copies from the build dir, but
> python keeps the one already installed during gdb startup.
>
> This patch only installs gdb.PYTHONDIR (and only runs
> gdb/__init__.py which installs the python-based gdb commands)
> if not running with -nx.
If this is the problem you're trying to solve, I think a new option is
better - but it's not -np. Why not an option to set gdb.PYTHONDIR
before loading anything?
That said, -np may be useful too. But at that point it becomes more
of a question whether it should be part of -nx.
--
Daniel Jacobowitz
CodeSourcery