breakpoint issue

Sysprogs forums Forums VisualGDB breakpoint issue

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #33513
    fide
    Participant

     

    Hi,
    
    We have a CMake project includes some shared libraries and a test project uses those shared libraries.
    When I set up a VisualGDB project for the test app, I can put a breakpoint in the test app itself and they are working all fine. 
    But when I put a breakpoint at shared library functions in the test app, it is not accepted and got message like you can see in the Debug3.pgn file.
    
    When I check libsyscommon_vs.log file, on the bottom it says that "No source file named ..." at given path. But in fact, the path is correct and the file exists there.
    I think this is a bug. I use 5.6R8 (build 4702)
    
    Any suggestion to solve the problem?
    Thank you.

     

    Attachments:
    You must be logged in to view attached files.
    #33518
    support
    Keymaster

    Hi,

    Most likely, your project uses custom non-trivial logic for placing the library symbols, and VisualGDB cannot automatically detect where the symbols are.

    In order to resolve it, please first go through this tutorial and make sure you understand how to check whether an ELF file contains debug symbols. Then, please inspect your project and find out the exact location of the .so file you are trying to debug. Make sure it contains debugging symbols as per the tutorial. Double-check that the symbols mention the file you are trying to debug. If not, you would need to adjust the build settings to make sure the symbols are not stripped.

    Once you confirm that the .so file contains symbols, please inspect the gdb log for the -gdb-set solib-search-path command. VisualGDB uses it to point gdb to the directories with the symbol files that are derived from the CMake code model. If it doesn’t contain the expected directory, you can override it by adding your own set solib-search-path command via VisualGDB Project Properties -> Additional GDB Commands.

    In general, VisualGDB computes the solib-search-path from the directories of the target’s references. If it’s missing a particular library, explicitly referencing it from the executable should solve it. You can double-check the references reported by CMake, as well as the exact library locations in the target-XXX.json files inside the build\<subdir>\.cmake directory.

     

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