[Cython] cygdb gdb script problem

mark florisson markflorisson88 at gmail.com
Tue Mar 29 21:40:22 CEST 2011

On 29 March 2011 21:11, Vitja Makarov <vitja.makarov at gmail.com> wrote:
> Running cygdb with Cython installed in the system leads to the
> following problem:
> vitja at vitja-laptop:~/work/cython-vitek-git/zzz$ python ../cygdb.py
> GNU gdb (GDB) 7.2-ubuntu
> Copyright (C) 2010 Free Software Foundation, Inc.
> License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
> This is free software: you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
> and "show warranty" for details.
> This GDB was configured as "x86_64-linux-gnu".
> For bug reporting instructions, please see:
> <http://www.gnu.org/software/gdb/bugs/>.
> Traceback (most recent call last):
>  File "<string>", line 1, in <module>
> ImportError: No module named Debugger
> /tmp/tmp1ZvOf9:3: Error in sourced command file:
> Error while executing Python code.
> (gdb)
> So may be it's better to explicitly specify correct path to Cython
> package in gdb script?
> Small example patch is attached.
> --
> vitja.
> _______________________________________________
> cython-devel mailing list
> cython-devel at python.org
> http://mail.python.org/mailman/listinfo/cython-devel

Hmm, when using cygdb it expects Cython to be in the path. I believe
your traceback means that it can find Cython, but not Cython.Debugger,
right? Are you sure you're using Python 2.6+? It doesn't work with any
version below 2.6 as they don't use the TP_FLAGS_*_SUBCLASS tp_flags.

In your patch you probably want to join() the dirname() with
os.pardir. However, I don't think it would really solve anything,
because if you install Cython, cygdb will be installed in e.g.
/usr/bin, so you'd be adding / to the path. If you want to run cygdb
from the cython/bin directory, then cython should be listed in

More information about the cython-devel mailing list