This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]