aarch64 gdb debug libstdc ++找不到方法stringstream str()

时间:2015-08-26 14:16:27

标签: c++ arm64

我已经在Fedora21-aarch64中安装了libstdc ++ - debuginfo包,但是当使用gdb打印stringstream.str()时,我总是得到这样的信息:

(gdb) ptype sp
type = class std::tr1::shared_ptr<std::basic_stringstream<char,   std::char_traits<char>, std::allocator<char> > >
[with _Tp = std::basic_stringstream<char, std::char_traits<char>, std::allocator<char> >]
    : public std::tr1::__shared_ptr<std::basic_stringstream<char, std::char_traits<char>, std::allocator<char> >, (__gnu_cxx::_Lock_policy)2> {
public:
shared_ptr(void);
void shared_ptr<std::basic_stringstream<char> >(std::basic_stringstream<char, std::char_traits<char>, std::allocator<char> > *);
}
(gdb) p sp->str()
 Couldn't find method std::basic_stringstream<char, std::char_traits<char>, std::allocator<char> >::str

源代码如下:

std::tr1::shared_ptr<stringstream> sp ( new stringstream(ios_base::in | ios_base::out | ios_base::binary));
std::tr1::shared_ptr<ostream> osp = sp;
osp->write("hello",6);
cout<<sp->str()<<endl;

和我安装的debuginfo包如下:

#debuginfo-install libstdc++
Loaded plugins: auto-update-debuginfo, langpacks
Package gcc-debuginfo-4.9.2-1.fc21.aarch64 already installed and latest version
Package glibc-debuginfo-2.20-5.fc21.aarch64 already installed and latest version
Package gcc-debuginfo-4.9.2-1.fc21.aarch64 already installed and latest version
No debuginfo packages available to install

0 个答案:

没有答案