public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* How can I set gdb.python directory on Windows?
@ 2011-08-09 13:26 PcX
  2011-08-09 20:43 ` Phil Muldoon
  0 siblings, 1 reply; 6+ messages in thread
From: PcX @ 2011-08-09 13:26 UTC (permalink / raw)
  To: gdb

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

         and found that the python pretty-printer directory not changed.

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

         Thanks.

-- 
Best Regards,
PcX

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: How can I set gdb.python directory on Windows?
  2011-08-09 13:26 How can I set gdb.python directory on Windows? PcX
@ 2011-08-09 20:43 ` Phil Muldoon
  2011-08-09 20:52   ` PcX
  0 siblings, 1 reply; 6+ messages in thread
From: Phil Muldoon @ 2011-08-09 20:43 UTC (permalink / raw)
  To: PcX; +Cc: gdb

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: How can I set gdb.python directory on Windows?
  2011-08-09 20:43 ` Phil Muldoon
@ 2011-08-09 20:52   ` PcX
  2011-08-10 14:00     ` Tom Tromey
  0 siblings, 1 reply; 6+ messages in thread
From: PcX @ 2011-08-09 20:52 UTC (permalink / raw)
  To: pmuldoon; +Cc: gdb

于 2011/8/10 4:43, Phil Muldoon 写道:
> 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?
Thank you.
I means after I built a gdb, if I copy it to my friend, his directory 
may be different from mine.

-- 
Best Regards,
PcX

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: How can I set gdb.python directory on Windows?
  2011-08-09 20:52   ` PcX
@ 2011-08-10 14:00     ` Tom Tromey
  2011-08-12 15:34       ` PcX
  0 siblings, 1 reply; 6+ messages in thread
From: Tom Tromey @ 2011-08-10 14:00 UTC (permalink / raw)
  To: PcX; +Cc: pmuldoon, gdb

>>>>> "PcX" == PcX  <xunxun1982@gmail.com> writes:

PcX> I means after I built a gdb, if I copy it to my friend, his directory
PcX> may be different from mine.

It should work ok as long as the install tree has the same shape.
There is some relocation-handling code in startup that deals with this.
Maybe this isn't working properly somehow?

Tom

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: How can I set gdb.python directory on Windows?
  2011-08-10 14:00     ` Tom Tromey
@ 2011-08-12 15:34       ` PcX
  2011-08-12 18:49         ` Tom Tromey
  0 siblings, 1 reply; 6+ messages in thread
From: PcX @ 2011-08-12 15:34 UTC (permalink / raw)
  To: Tom Tromey; +Cc: pmuldoon, gdb

于 2011/8/10 21:59, Tom Tromey 写道:
>>>>>> "PcX" == PcX<xunxun1982@gmail.com>  writes:
> PcX>  I means after I built a gdb, if I copy it to my friend, his directory
> PcX>  may be different from mine.
>
> It should work ok as long as the install tree has the same shape.
> There is some relocation-handling code in startup that deals with this.
> Maybe this isn't working properly somehow?
>
> Tom
I don't think so.
As I type "python print gdb.PYTHONDIR" in gdb command, it will output: 
c:\mingw\share\gdb/python

But my gdb python pretty printer directory is 
"e:\mypack\mingw\share\gdb\python".

Is this a windows specific problem?

-- 
Best Regards,
PcX

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: How can I set gdb.python directory on Windows?
  2011-08-12 15:34       ` PcX
@ 2011-08-12 18:49         ` Tom Tromey
  0 siblings, 0 replies; 6+ messages in thread
From: Tom Tromey @ 2011-08-12 18:49 UTC (permalink / raw)
  To: PcX; +Cc: pmuldoon, gdb

>>>>> "PcX" == PcX  <xunxun1982@gmail.com> writes:

PcX> As I type "python print gdb.PYTHONDIR" in gdb command, it will output:
PcX> c:\mingw\share\gdb/python
PcX> But my gdb python pretty printer directory is
PcX> "e:\mypack\mingw\share\gdb\python".

PcX> Is this a windows specific problem?

I don't know.  I think you will probably have to debug it if you want an
answer.

Tom

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-08-12 18:49 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-09 13:26 How can I set gdb.python directory on Windows? PcX
2011-08-09 20:43 ` Phil Muldoon
2011-08-09 20:52   ` PcX
2011-08-10 14:00     ` Tom Tromey
2011-08-12 15:34       ` PcX
2011-08-12 18:49         ` Tom Tromey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).