You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When CyGDB is used with GDB10 it seems to be unable to properly map functions back and forth between C/C++ and Cython
To Reproduce
Using GDB10 set a breakpoint on a cython function and try to cy list
(gdb) cy list
Traceback (most recent call last):
File "/Users/amol/wrk/ursa/cython/Cython/Debugger/libpython.py", line 1980, in wrapper
return function(*args, **kwargs)
File "/Users/amol/wrk/ursa/cython/Cython/Debugger/libcython.py", line 1103, in invoke
source = sd.get_source(lineno - 5, lineno + 5, mark_line=lineno,
File "/Users/amol/wrk/ursa/cython/Cython/Debugger/libcython.py", line 468, in get_source
raise exc
gdb.GdbError: Unable to retrieve source code
Environment (please complete the following information):
OS: OSX
Python version 3.9.5
Cython version 3.0a6
GDB 10.2
Additional context
The issue seems to be caused by gdb.selected_frame().name() that now returns the whole function signature including arguments instead of just the name.
In my specific case cygdb looks for __pyx_pf_7pyarrow_3lib_5Array_61to_numpy(__pyx_obj_7pyarrow_3lib_Array*, _object*, _object*) into functions_by_cname but given that the debug information are generated without arguments
the get_cython_function method is unable to find it.
I'm not sure if this is an issue in GDB itself or in Cydb. I mean... We are asking the "name" to GDB and I don't feel that implies the whole signature. In any case it can probably be avoided by removing the function arguments in libcython itself when looking up functions, thus retaining compatibility with both GDB9 and 10.
I can work on a PR in that direction if we feel that's the right way to fix this.
The text was updated successfully, but these errors were encountered:
Describe the bug
When CyGDB is used with GDB10 it seems to be unable to properly map functions back and forth between C/C++ and Cython
To Reproduce
Using GDB10 set a breakpoint on a cython function and try to
cy list
Environment (please complete the following information):
Additional context
The issue seems to be caused by
gdb.selected_frame().name()
that now returns the whole function signature including arguments instead of just the name.In my specific case cygdb looks for
__pyx_pf_7pyarrow_3lib_5Array_61to_numpy(__pyx_obj_7pyarrow_3lib_Array*, _object*, _object*)
intofunctions_by_cname
but given that the debug information are generated without argumentsthe
get_cython_function
method is unable to find it.I'm not sure if this is an issue in GDB itself or in Cydb. I mean... We are asking the "name" to GDB and I don't feel that implies the whole signature. In any case it can probably be avoided by removing the function arguments in
libcython
itself when looking up functions, thus retaining compatibility with both GDB9 and 10.I can work on a PR in that direction if we feel that's the right way to fix this.
The text was updated successfully, but these errors were encountered: