After I input "step", gdb will not go into the function for debugging.

Source: Internet
Author: User
I entered "step" and gdb won't go into the function to debug-Linux general technology-Linux technology and application information. The following is a detailed description. I typed "step", but gdb did not step into the specified function.
After I input "step", gdb will not go into the function for debugging.
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 can enter the internal function of getLine ().
Operator_analyze.setSize (I); // But gdb does not enter the getSize () Internal
Operator_analyze.setSource (line); // it will not enter
Unsigned int k = 0;
While (k Tc [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;
}
Type "step". It seems that gdb will not enter functions in the "operator_analyze" class and can enter other functions.
Can anyone explain to me?
However, if you keep entering stepi, you can enter the function. Help !!
Thanks!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.