Open ocrush1 opened 5 years ago
few comments from community discussion. see https://groups.google.com/a/continuum.io/forum/#!mydiscussions/anaconda/NgrSLn11Znk
Reply from Ray Donnelly: You'd be best off filing a bug for this at https://github.com/ContinuumIO/anaconda-issues/issues so we can keep track of it. Please copy in the conversation so far if you elect to do that.
The Anaconda Python's are not currently built with this use-case in mind. That it worked before was a fluke I suspect, in that AD 4.3.2 Python was more compatible with your system Python than AD 5.3.x Python is.
We are missing e.g. python3.6-gdb.py
and really need to use our own gdb
compiled against our Python. You may want to test and/or contribute towards the gdb package over at https://github.com/conda-forge/gdb-feedstock. You'll need to track down that python3.6-gdb.py
from somewhere though I think. If you wanted to fix our packaging but that's causing that file not to be present (it should live at bin/pythonX.X-gdb.py
) then a PR to https://github.com/AnacondaRecipes/python-feedstock (or https://github.com/conda-forge/python-feedstock) would be very welcome.
I'm not sure if the Python interpreter needs to be built with --with-PyDebug though, I know back when I was hacking on mingw-w64/python that was necessary. These days I'm not sure, but I'd definitely like to know where we stand and am very interested in making this work as well as we can.
Actual Behavior
I have a c/c++ extension that is called from Python and in the past I was able to use gdb to set a break point in my c/c++ extension code and use "py-bt" to see the Python backtrace. However, Anaconda 5.3 (Python 2.7) does not allow me to do so.
everything worked fine with Anaconda 4.3.2. Any ideas on what might have changed between these versions? It may be optimization flags, etc. Any plans to support such a use case in the future?
output from 5.3: Breakpoint 1, sum (num=6, num_array=0x555555c5dd80) at ../../src/test_ctypes_numpy.c:7 7 for (i=0;i < num;i++) (gdb) py-bt
6 (unable to read python frame information)
7 (unable to read python frame information)
Expected Behavior
output from 4.3.2: Breakpoint 1, sum (num=6, num_array=0xa041a0) at ../../src/test_ctypes_numpy.c:7 7 for (i=0;i < num;i++) (gdb) py-bt
9 Frame 0x7fffeec59230, for file test_sum.py, line 18, in py_sum (numbers=<numpy.ndarray at remote 0x7ffff7e1ab70>, num_numbers=6)
12 (frame information optimized out)
Steps to Reproduce
Create a simple C/C++ extension and call via Python
Anaconda or Miniconda version:
Anaconda 5.3
Operating System:
Ubuntu1404
conda info
conda list --show-channel-urls