Step through from C# to C++

Sysprogs forums Forums VisualGDB Step through from C# to C++

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #411
    Dimitar Dobrev
    Participant

    Hello,

    I have a C# program that P/Invokes C++ code compiled with MinGW. Can I use VisualGDB to step from C# to C++ while debugging with Visual Studio? This works with C# and Visual C++ and I am looking for the same experience with C# and MinGW.

    Thanks,
    Dimitar Dobrev

    #2043
    support
    Keymaster

    Hi,

    Unfortunately, stepping into the functions from C# to VisualGDB-based C++ is not supported.
    However, you can start C# debugging in Visual Studio and then attach to the same process with VisualGDB from another Visual Studio instance.
    Although stepping between C# and C++ won’t work, you will be able to debug C# code from one Visual Studio instance and the C++ code from another instance.

    #2041
    shirokobrod
    Participant

    Hello, I followed your advice but failed. 1. If host application is run from VS IDE, it is impossible to attach it to the dll which is active in another instance of VS IDE. So I run the host application separately. This application uses dll compiled with MinGW and which I am going to debug with VisualGDB. Host asks for some console imput to let VS with VisualGDB dll project to attach to the host process. After the dll is attached to the host process and host process calls dll function, VisualGDB does not go to a set breakpoint. It displays message that symbols are not loaded and shows some dasassemled code. Could you advice how to mannage debugging MinGW dll?
    Thanks,

    Oleg Shirokobrod

    #2042
    support
    Keymaster

    Hi,

    Please ensure that the the DLL being loaded contains symbols. Please run the ‘info shared’ command in the GDB Session window and paste the output here. Please also run the ‘info sources’ command to see which source files are listed in the currently loaded symbols.

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