Sysprogs forums › Forums › VisualGDB › -var-create: unable to create variable object
- This topic has 6 replies, 4 voices, and was last updated 7 years, 10 months ago by bmcdonnell_psi.
-
AuthorPosts
-
September 23, 2014 at 00:41 #789jyhurParticipant
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.-var-create --frame 0 --thread 1 - * "this" &"warning: (Internal error: pc 0x51250000 in read in psymtab, but not in symtab.)n" &"n" -var-create: unable to create variable object
BTW, VisualGDB is awesome!! 😀
September 29, 2014 at 05:20 #3070jyhurParticipantI 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.October 1, 2014 at 00:10 #3069supportKeymasterHi,
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. October 9, 2014 at 02:46 #3068jyhurParticipantI 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. 😀November 10, 2014 at 13:19 #3067AnonymousParticipant@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”November 10, 2014 at 14:21 #3066AnonymousParticipant@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. =_=January 31, 2017 at 20:04 #10242bmcdonnell_psiParticipantFor 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 watchedbuffer
instead. -
AuthorPosts
- You must be logged in to reply to this topic.