写个简单C++程序;运行如下;
#include "stdafx.h"
#include <iostream>
using namespace std;
class Student{
public:
char *name;
int age;
float score;
void say(){
cout<<name<<"的年龄是"<<age<<",成绩是"<<score<<endl;
}
};
int _tmain(int argc, _TCHAR* argv[])
{
Student stu;
stu.name = "小明";
stu.age = 15;
stu.score = 92.5f;
stu.say();
system("pause");
return 0;
}
我想通过Windbg来查看一下stu.xxx的值的情况;
从 文件 菜单选择 打开可执行文件;打开前面的exe;先不管release或debug版;
打开以后自己停留在下图,出来一个 int 3;这应是停在程序开始处;还未执行第一条指令;
也可以输入 .sympath srv* 命令设置符号文件路径;没有调试符号文件也先不管,没有这个可能只是有的系统的东西看不到;