can't resolve symbols when debugging my own .so file

Sysprogs forums Forums VisualGDB can't resolve symbols when debugging my own .so file

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #9385
    t2k
    Participant

    The basic setup –

    I’m developing with the cross-compiler toolchain to produce software for the Raspberry Pi. I’m using VS2015 Community Edition.

    I have one project that builds a .so file (with debug info).

    I have a second project (an executable) that links to and runs with the .so file.

    When I debug the second project I can step through that source code just fine, but when I try to step into any of the code in my .so file, all I can see is disassembly.

    Some useful output from gdb (my library is called libsvpi.so):

    >info sharedlibrary

    From To Syms Read Shared Object Library
    0x76fcf7c0 0x76fe8408

    Yes c:\sysgcc\raspberry\arm-linux-gnueabihf\sysroot/lib/ld-linux-armhf.so.3
    No linux-vdso.so.1
    No /usr/lib/arm-linux-gnueabihf/libarmmem.so
    No /home/pi/SVPi/libsvpi.so

    <hr />

    if I type “sharedlibrary libsvpi.si”, it just says “OK”, but it seems as though nothing has changed because if I type “info sharedlibrary” again, it  says “No” for Syms read.

     

    How do I force it to read/find the symbols for this .so so that I can step through it in the debugger?

     

    Thanks!

    #9388
    support
    Keymaster

    Hi,

    You can tell gdb where to look for your .so symbols using the set solib-search-path command. Normally VisualGDB should do it automatically as long as your application project references the .so project.

    If it is referenced and the .so library is not found, please let us know and we will investigate and fix this.

    #9390
    t2k
    Participant

    Should it be referencing the path of the .so on the machine I am debugging from? or the .so on the machine I am running on? I am remote debugging…

    #9391
    support
    Keymaster

    Hi,

    If the .so library is built by a VisualGDB project, you can simply reference the project via Add->Reference. If not, you would need to manually add the following command to GDB startup commands:

    set solib-search-path <directory on Windows where the .so file is located>
Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.