c++ - How to inspect std::string in GDB with no source code? -


i'm trying debug program has no source code available, , need @ has stored in std::string. i've been googling , looking on here, , i've found information outputting stl containers, of refers variables, no source or debug information have memory offset of class data. there way this?

every std::string implementation has pointer raw characters in somewhere. g++ 4.x, pointer @ offset 0 string.

if know string resides @ e.g. 0x7fffffffda88, then

print *(char**)0x7fffffffda88 

is need.


Comments

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -