public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* python help(gdb) doesn't work in my local build.
@ 2011-03-11 19:45 Michael Snyder
  2011-03-11 20:39 ` Tom Tromey
  2011-03-11 20:48 ` Jan Kratochvil
  0 siblings, 2 replies; 5+ messages in thread
From: Michael Snyder @ 2011-03-11 19:45 UTC (permalink / raw)
  To: gdb

It says:

No such file or directory: '/usr/local/share/gdb/python/gdb'

1) What do I do to tell it where to look locally?
2) What do I do to install this by hand?

Thanks,
Michael

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

* Re: python help(gdb) doesn't work in my local build.
  2011-03-11 19:45 python help(gdb) doesn't work in my local build Michael Snyder
@ 2011-03-11 20:39 ` Tom Tromey
  2011-03-11 21:03   ` Michael Snyder
  2011-03-11 20:48 ` Jan Kratochvil
  1 sibling, 1 reply; 5+ messages in thread
From: Tom Tromey @ 2011-03-11 20:39 UTC (permalink / raw)
  To: Michael Snyder; +Cc: gdb

Michael> It says:
Michael> No such file or directory: '/usr/local/share/gdb/python/gdb'

Michael> 1) What do I do to tell it where to look locally?
Michael> 2) What do I do to install this by hand?

I don't think that is enough information to know what is going on in
your scenario, but I would hazard a guess that you did not `make
install', but that the python module is still referring to the install
path.

Maybe this is fixable.  Or you could make install.

Tom

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

* Re: python help(gdb) doesn't work in my local build.
  2011-03-11 19:45 python help(gdb) doesn't work in my local build Michael Snyder
  2011-03-11 20:39 ` Tom Tromey
@ 2011-03-11 20:48 ` Jan Kratochvil
  1 sibling, 0 replies; 5+ messages in thread
From: Jan Kratochvil @ 2011-03-11 20:48 UTC (permalink / raw)
  To: Michael Snyder; +Cc: gdb

On Fri, 11 Mar 2011 20:45:14 +0100, Michael Snyder wrote:
> No such file or directory: '/usr/local/share/gdb/python/gdb'
> 
> 1) What do I do to tell it where to look locally?
> 2) What do I do to install this by hand?

GDB is intentionally omitted from the standalone-Python help.

On correctly Fedora 14 x86_64 installed Python+GDB:

$ python -c 'help(gdb)'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
NameError: name 'gdb' is not defined
$ gdb -q -nx -ex 'python help(gdb)' -ex q
Help on package gdb:

NAME
    gdb
[...]

GDB part of the help was intentionally moved out of the standard Python help
directory tree as reading the code providing help texts requires to load the
whole such Python modules which require the bindings provided by GDB itself.

http://bugs.python.org/issue7015
https://bugzilla.redhat.com/show_bug.cgi?id=526313

$ python
>>> help()                                                                      help> modules gdb

Here is a list of matching modules.  Enter any module name to get more help.

Traceback (most recent call last):
<module>
    class RequireCommand (gdb.Command):
AttributeError: 'module' object has no attribute 'Command'



Regards,
Jan

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

* Re: python help(gdb) doesn't work in my local build.
  2011-03-11 20:39 ` Tom Tromey
@ 2011-03-11 21:03   ` Michael Snyder
  2011-03-11 21:52     ` Tom Tromey
  0 siblings, 1 reply; 5+ messages in thread
From: Michael Snyder @ 2011-03-11 21:03 UTC (permalink / raw)
  To: Tom Tromey; +Cc: gdb

Tom Tromey wrote:
> Michael> It says:
> Michael> No such file or directory: '/usr/local/share/gdb/python/gdb'
> 
> Michael> 1) What do I do to tell it where to look locally?
> Michael> 2) What do I do to install this by hand?
> 
> I don't think that is enough information to know what is going on in
> your scenario, but I would hazard a guess that you did not `make
> install', but that the python module is still referring to the install
> path.

Correct -- I am running gdb from my build tree.

> 
> Maybe this is fixable.  Or you could make install.

How would you get it to work from your build tree?



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

* Re: python help(gdb) doesn't work in my local build.
  2011-03-11 21:03   ` Michael Snyder
@ 2011-03-11 21:52     ` Tom Tromey
  0 siblings, 0 replies; 5+ messages in thread
From: Tom Tromey @ 2011-03-11 21:52 UTC (permalink / raw)
  To: Michael Snyder; +Cc: gdb

Tom> Maybe this is fixable.  Or you could make install.

Michael> How would you get it to work from your build tree?

Actually, it works fine for me.

I guess I would debug the startup code in python.c to see why it isn't
working for you.  See _initialize_python, there is a comment about
data-directory, which is where the runtime stuff gets copied and used
for in-tree runs.

Tom

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

end of thread, other threads:[~2011-03-11 21:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-11 19:45 python help(gdb) doesn't work in my local build Michael Snyder
2011-03-11 20:39 ` Tom Tromey
2011-03-11 21:03   ` Michael Snyder
2011-03-11 21:52     ` Tom Tromey
2011-03-11 20:48 ` Jan Kratochvil

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).