Re: How can I set gdb.python directory on Windows?

Phil Muldoon
2011-08-09T20:43:28Z

PcX <xunxun1982@gmail.com> writes:

> Hi, all
>
> Since gdb harcodes its share directory, but I usually move the gdb
> to other directory.
> I found that in gdb command:
>
> set data-directory e:\mypack\mingw\share\gdb
>
> I can set gdb's share directory, but I type

> python print gdb.PYTHONDIR

gdb.PYTHONDIR is set at start-up to the current data-directory + the
Python relevant paths. I think it is a bug that "set data-directory"
does not alter gdb.PYTHONDIR.

> Is there some methods to change the gdb python pretty-printer
> directory to e:\mypack\mingw\share\gdb\python?

You can run configure with the --prefix="your/path", or if you wished
you could set gdb.PYTHONDIR directly with python gdb.PYTHONDIR="blah"

I can't think if case where you want to do this outside of the build
parameter passed to configure, as that is where the Python files will be
installed. Is the --prefix command what you need, or is there another
scenario you have in mind?

Cheers,

Phil