Re: [RFA] Don't install gdb.PYTHONDIR if -nx

Daniel Jacobowitz
2010-11-30T04:22:20Z

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