Sysprogs forums › Forums › VisualGDB › Possible bug in Custom Debug Steps
- This topic has 4 replies, 2 voices, and was last updated 11 years ago by kbzowski.
-
AuthorPosts
-
November 21, 2013 at 15:23 #685kbzowskiParticipant
Hi, I have decided to speedup compilation process by moving from mono build server to SSH. Our linux server is based on Environment Modules Project (http://modules.sourceforge.net/). So, first in “Custom build steps” I have added “module load gcc/4.8.1” to load necessary libraries – compilation worked great.
Next, I have added same entries to “Custom debug steps”. But I still cannot run my software. In console I got only “error while loading shared libraries: libquadmath.so.0: cannot open shared object file: No such file or directory”. What indicates, that LD_LIBRARY_PATH wasn’t set properly by Environment Modules. It is working properly when I manually connect to server using ssh client.
I had added suitable “export LD_LIBRARY_PATH” to my .bashrc and it has started working – but I would prefer to manage it via VisualGDB.
I am working with VisualGDB 4.1r7 Custom Edition.
Best regards,
Krzysztof BzowskiNovember 21, 2013 at 20:05 #2787ketParticipantHi,
Please check in the Output window for any errors for the pre-debug steps, change the filter to show output from VisualGDB Launcher.
November 23, 2013 at 12:00 #2788kbzowskiParticipantEverything looks good there. No errors. Only information about successfully loaded modules.
I tried also set one export command (which works when it is added to .bashrc) – same thing. No error – doesn’t work.VisualGDB: Executing predebug actions VisualGDB: Run "export LD_LIBRARY_PATH=/packages/gcc/4.8.1/lib64:/packages/gcc/4.8.1/lib" in directory "/home/kbzowski/femafat" on kbzowski@xx.xx (SSH) VisualGDB: Launching gdb VisualGDB: Run "/packages/gdb/7.6/bin/gdb --interpreter mi --args "$(TargetPath)"" in directory "$(BuildDir)" on kbzowski@xx.xx (SSH) VisualGDB: Executing postdebug actions
November 27, 2013 at 03:28 #2789ketParticipantHi,
It looks like the pre-debug steps are executed fine. The problem here is that the LD_LIBRARY_PATH variable should be specified as part of gdb’s environment, setting the variable in a separate command will not pass it to gdb as it is executed in a different channel.
To set the LD_LIBRARY_PATH variable for gdb, please go to Debug settings in VisualGDB Project Properties. There switch to using a custom GDB executable, then press on Customize and add the LD_LIBRARY_PATH variable definition to the environment variables there. Note that this will not work if you are using a gdbserver (building and debugging on a different machine). We will add an option to specify the debug environment in the case of gdbservers in the next version of VisualGDB.
December 2, 2013 at 13:43 #2790kbzowskiParticipantIt works, but It would be very nice to see Custom Debug Step connected to GDB launching.
Many people use Environmental Modules to load libraries before debugging – so I think it will be helpful. -
AuthorPosts
- You must be logged in to reply to this topic.