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