With gdb you can print std::string by below 2 methods.
- p mystr.c_str() -this can be used to print value of type std::string.
- p *(char**) 0x7f8fbb7a9c20 -this works for a memory with type std::string.
With gdb you can print std::string by below 2 methods.