-var-create: unable to create variable object

Sysprogs forums Forums VisualGDB -var-create: unable to create variable object

This topic contains 6 replies, has 4 voices, and was last updated by  bmcdonnell_psi 2 years, 8 months ago.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #789

    jyhur
    Participant

    Hello.

    My project is a large cmake project for Android. Build output(.so) is about 2GB. (and 20MB if stripped)
    I built it on linux(ndk r10, gcc4.8) and copied stripped “.so” to Windows and made APK on Windows.

    I ran it using “Quick Debug” with below options,
    – “Debug code that executes during App startup”
    – “Disable -file-list-exec-source-files”
    – arm-linux-androideabi-4.6 (ndk r10)

    I could set a breakpoint and when it breaked, callstacks and threads were shown perfectly.
    But any variables couldn’t be examined. GDB outputs were like this.

    BTW, VisualGDB is awesome!! 😀

    #3070

    jyhur
    Participant

    I found the reason.
    The versions of toolchain, that are used for building and debugging, should be same.
    In my case, I built my project with GCC-4.8 and tried to debug with GCC-4.6. That was the problem.

    #3069

    support
    Keymaster

    Hi,

    The root cause for this message is incompatibility between the debug information issued by GCC and read by GDB. If you encounter it again, try experimenting with the -gdwarf- GCC flag.

    #3068

    jyhur
    Participant

    I succeeded debugging by adding “-gdwarf-2” gcc flag.
    Now I can build with GCC4.8 and debug with GCC4.6.
    Thank you for your help. 😀

    #3067

    Anonymous
    Participant

    @bazis wrote:

    Hi,

    The root cause for this message is incompatibility between the debug information issued by GCC and read by GDB. If you encounter it again, try experimenting with the -gdwarf- GCC flag.

    hi,brother
    thanks very much
    It’s was useful when i debug with gcc
    but when i try to debug with g++
    it still tell me “-var-create: unable to create variable object”

    #3066

    Anonymous
    Participant

    @wks wrote:

    @bazis wrote:

    Hi,

    The root cause for this message is incompatibility between the debug information issued by GCC and read by GDB. If you encounter it again, try experimenting with the -gdwarf- GCC flag.

    hi,brother
    thanks very much
    It’s was useful when i debug with gcc
    but when i try to debug with g++
    it still tell me “-var-create: unable to create variable object”

    i have aleady solves it.with these command:

    dpkg -l |grep ii | grep gcc
    dpkg -l |grep ii | grep g++
    sudo rm /usr/bin/gcc
    sudo rm /usr/bin/g++
    sudo ln -s /usr/bin/gcc-4.6 /usr/bin/gcc
    sudo ln -s /usr/bin/g++-4.6 /usr/bin/g++

    and now,we don’t need the “-gdwarf-2”
    my os is ubuntu 14.04. i had update my gcc and g++ to 4.8 .
    now i choice to use 4.6.
    my first language is not english… I hope the information can help others. =_=

    #10242

    bmcdonnell_psi
    Participant

    For any future readers, I recently got this error, but not for that reason. I had

    uint32_t buffer[32];

    uint8_t *pBuf = (uint8_t *)buffer;

    I got the error when I put pBuf,128 in the Watch window, having forgotten that it’s just a pointer, not the actual array. So I watched buffer instead.

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.