Open mingwandroid opened 6 years ago
Hi @mingwandroid,
It would be great to have an out-of-the-box debugging solution.
Initially I set --with-separate-debug-dir
this way just because I wanted to add /usr/lib/debug
, which is the path used by most Linux distros. This made it possible to use conda-forge's gdb to debug system's python. Sometimes this may be desirable when you are working on an old system or where you can't install gdb system-wise. And $PREFIX/lib/debug
was added just because it is gdb's default when --with-separate-debug-dir
is not given.
So I think it would be good to keep both paths, but I totally agree with adding other ones that can be used to unpack conda sources.
But if you don't want to remap source paths in gdb, you have to always build packages in one of the paths you mentioned (/usr/local/src
or /opt/conda/src
), right? Do you plan to change the build path (in the docker image, for example)?
But if you don't want to remap source paths in gdb, you have to always build packages in one of the paths you mentioned
No, this is fixed via debug-prefix remapping. This is specifically to avoid the issue with build paths being somewhat random.
If you want to debug a build you should create symlinks to the work directory. I'll figure out some conda-build debug stuff to
I'm not sure which way to go, /opt/conda/src
is my new preferred directory for this remap.. I do want a great debugging experience fwiw! Conda build will need some new additions to do the symlinks for you.
Hi @isuruf, @gqmelo, @msarahan, @nehaljwani, @jjhelmus, @conda-forge/core
It would be nice if AD could provide GDB (someone ran into trouble using, I guess, their system GDB recently on the Anaconda Community mailing list).
I think we may want to align the subject line with:
My plan was to modify (I think it exists, never tried it!)
conda-debug
so you can pass it a package tarball or a package name in the current env and it unpacks the source code, applies patches and launches gdb (optionally).I selected
/usr/local/src
but some have stated a preference for/opt/conda/src
or something like that. The problem as I see it is that we don't really want a path that's in the prefix, as that would risk serious clobbering opportunities. Also, I am not really confident that we can do binary prefix replacement inside some (seperated by now, hopefully) debug information, therefore I think a fixed path is safer and easier (yes, gdb can remap source paths but it's a pain in the you know what and debugging needs to be as easy as we can make it .. I am willing to cencede that requiring things to get put in an absolute path isn't going to be possible for everyone, on that point could/should we use/tmp/conda/src
instead?)Also, we need to be packaging
bin/pythonX.X-gdb.py
in our python builds.