我输入了“step”,gdb不会进入函数内部去调试
the code is:
Code:
#include "file.h"
#include "WordAnalyze.h"
#include "OperatorPriorAnalyze.h"
#include
#include
using namespace std;
int main(int argc, char** argv) {
unsigned int size;
char *mem;
char* line;
char tc[100];
file f1;
OperatorPriorAnalyze operator_analyze;
WordAnalyze w1;
size = f1.readfile("./test.txt", &mem );
w1.setSource(mem);
w1.setSize(size);
while( !w1.atEnd() ){
unsigned int i = w1.getLineSize();
line = w1.getLine(); //gdb能进入getLine()函数内部
operator_analyze.setSize(i); //但gdb不会进入getSize()内部
operator_analyze.setSource(line); //同样不会进入
unsigned int k = 0;
while(ktc[k] = line[k];
k++;
}
tc[k] = '\0';
cout<< tc;
operator_analyze.restart();
if(operator_analyze.Judge() == 0 )
cout<< "Right!" << endl;
else
cout<< "Wrong! " << operator_analyze.getError() << endl;
delete line;
}
return 0;
}
键入“step”,好像gdb不会进入 "operator_analyze"类内部的函数,能进入其它的函数。
Can anyone explain to me?
但如果不停地输入stepi,就能进入函数内部。求救!!
Thanks !