This is the mail archive of the gdb@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: python help(gdb) doesn't work in my local build.


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


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