Possible bug in Custom Debug Steps

Sysprogs forums Forums VisualGDB Possible bug in Custom Debug Steps

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #685
    kbzowski
    Participant

    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 Bzowski

    #2787
    ket
    Participant

    Hi,

    Please check in the Output window for any errors for the pre-debug steps, change the filter to show output from VisualGDB Launcher.

    #2788
    kbzowski
    Participant

    Everything 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
    
    #2789
    ket
    Participant

    Hi,

    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.

    #2790
    kbzowski
    Participant

    It 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.

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.