I’m trying to get cygdb running on Ubuntu 22.04 LTS by following the official docs. I’m getting errors like Cannot find bounds of current function when trying to step through the code.
I set up my environment by:
Downloading the gdb-12.1 source code and running:
./configure --with-python=python2
make
sudo make install
Creating the following files:cython_file.pyx:
def big_sum():
cdef int a[10000]
for i in range(10000):
a[i] = i
# <==================== I want to put a break here
cdef int my_sum
my_sum = 0
for i in range(1000):
my_sum += a[i]
return my_sum
if __name__ == "__main__":
print("Calling cython_file as main")
print(big_sum())
python_file.py:
import pyximport
pyximport.install()
from cython_file import big_sum
result = big_sum()
print(result)
setup.py:
from setuptools import Extension, setup
from Cython.Build import cythonize
setup(
ext_modules = cythonize(
Extension(
"cython_file",
["cython_file.pyx"]),
gdb_debug=True,
),
extra_compile_args=["-g"],
)
Running cython --gdb cython_file.pyx (from a Python3 virtual environment, so Python3 version of cython?)
Running python3 setup.py build_ext --inplace
After performing these steps and running cygdb, I get error messages in this paste.
Does anyone know how to fix?