我正在对崩溃的程序进行事后分析。我在 Linux (Ubuntu 12.04, x86) 上,代码是用 C++ 编写的。本程序正在使用一些可能包含有价值信息的单例。如果像这样创建,是否可以找到指向单例实例的指针:
SingletonType& SingletonType::getInstance(){
static SingletonType* instance = new SingletonType();
return *instance;
}
Run Code Online (Sandbox Code Playgroud)
如果可能的话,它是如何在 GDB 中完成的?