字符数组,字符串指针,字符串指针数组,std::string对象

反汇编详细分析各式各样的情况

字符数组,字符串指针,字符串指针数组,std::string对象_第1张图片
2016-11-16 23-14-56屏幕截图.png

1)构造std::string对象,依次传递了分配器对象地址,字符串指针,this指针

c++filt _ZNSaIcEC1Ev
std::allocator::allocator()

c++filt _ZNSaIcED1Ev
std::allocator::~allocator()

c++filt ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1EPKcRKS3
std::__cxx11::basic_string,std::allocator >::basic_string(char const*,std::allocator const&)

2)0x8048a10在.rodata节,不能修改

  编译器报错  error: assignment of read-only location

3)

你可能感兴趣的:(字符数组,字符串指针,字符串指针数组,std::string对象)