我有一个类看起来像这样:
namespace madoka { class polarizable_sites { public: void resize(const size_t dim_); void clear(void); }; }
在gdb中,我可以在明确时设置断点
b 'madoka::polarizable_sites::clear()'
但是,对于成员函数调整大小,a
b 'madoka::polarizable_sites::resize(const size_t)'
不起作用. GDB报告错误:
the class madoka::polarizable_sites does not have any method named
resize(const size_t) Hint: try
‘madoka::polarizable_sites::resize(const size_t)’ or
‘madoka::polarizable_sites::resize(const size_t)’ (Note leading
single quote.)
顺便说一句:我正在使用GDB
GNU gdb (Ubuntu/Linaro 7.2-1ubuntu11) 7.2 Copyright (C) 2010 Free
Software Foundation,Inc.
与编译器’
g++ (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
Copyright (C) 2010 Free Software Foundation,Inc.