当前位置: 技术问答>linux和unix
我输入了“step”,gdb不会进入函数内部去调试
来源: 互联网 发布时间:2016-09-23
本文导语: I typed "step", but gdb did not step into the specified function. 我输入了“step”,gdb不会进入函数内部去调试 the code is: Code: #include "file.h" #include "WordAnalyze.h" #include "OperatorPriorAnalyze.h" #include #include using namespace std...
I typed "step", but gdb did not step into the specified function.
我输入了“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(k
我输入了“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(k