You are not logged in.
Excuse me, but why do I have to install python along with gdb?
And can I install it without python?
Thanks
Offline
Offline
And no you can not run it without python...
> readelf -d /usr/bin/gdb
...
0x00000001 (NEEDED) Shared library: [libpython2.6.so.1.0]
Offline
Thank you for the clear answer.
However, if I may ask, in my head gdb is a C++ debugger which completes the toolset along with gcc. It looks very weird to me that a C++ debugger (I know it can debug other things) requires an interpreter for another language.
I don't have python installed because I think it's weird to have python, ruby, java, haskell, mono, and whatever one program needs, all installed together. That's what I had before until I simply chose program which don't need these.
So the questions are: what is the reasoning of making it a must, I mean, can't it be an optional dependency? and can I build it without python support? even just for trying. Is there a PKGBUILD to make things easier?
Thanks
Offline
Python scripting is one of the big new features in the latest gdb. And it can be really helpful so we want to include it in the package. As the binary links to python when built with this scripting support, it can not be an optdepend.
To rebuild it yourself without python support, just remove python from the depends array.
Offline
When you don't trust Arch packagers' taste of what functions (ie compile flags) to include, it's a good idea to look at Debian
http://packages.debian.org/squeeze/gdb
In this case even Debian has python dependency.
Offline
Thank you for the clear answer.
However, if I may ask, in my head gdb is a C++ debugger which completes the toolset along with gcc. It looks very weird to me that a C++ debugger (I know it can debug other things) requires an interpreter for another language.
...
AFAIK the C++ coding gdb devs have been the driving force behind the python scripting in gdb, since they wanted to use python to do pretty printing of C++ STL containers (the good old gdb scripting language is not powerful enough for this). It works fantastic. The python code for this will be part of gcc-4.5.
Here is the ~/.gdbinit I use
{{{
python
import sys
sys.path.insert(0, '/home/maik/abs/gcc/gcc-snapshot/src/gcc-4.5-20091126/libstdc++-v3/python')
from libstdcxx.v6.printers import register_libstdcxx_printers
register_libstdcxx_printers (None)
}}}
Btw., the gcc-4.5 python pretty printer work fine with gcc-4.4.
Best,
-- Maik
Offline