confused problem

F

freegnu

0340
0341
0342/** main function */
0343 int main(int argc,char *argv[]) {
int i, j, xferSize=-1, debug_level=1, nLoopCount = 0,
nLoopRepeat = 1;
int bUserStop = FALSE;
int bLoopback = FALSE, enable_OSD = FALSE;
0347 int bSkipDL = FALSE, bLogFile = FALSE, bI2CTable = TRUE, bTVTuner =
FALSE;
char *config_overrides[128]; // up to 128 different
parameters
int num_overrides = 0;
U32 pMode = 0xffff;

0352 BOOL do_mar = FALSE, fixed_pattern = FALSE, set_135mhz = FALSE,
set_162mhz = FALSE;
BOOL disable_config = FALSE;
TVTunerSelection tv_tuner_selection;
VW2010Impl vw2010hw; // actual hardware
implementation
IVwebHW *chip_interface = &vw2010hw; // virtual
interface to the hardware
printVersion(chip_interface);
if (argc < 3) {
printUsage();
return SUCCESS;
}
........
}
i use gdb debug the program , i find the process flow by
0347->0341->0347->0352->0341->0352 , it seems disordered, im really puzzled
 
V

Victor Bazarov

freegnu said:
0340
0341
0342/** main function */
0343 int main(int argc,char *argv[]) {
int i, j, xferSize=-1, debug_level=1, nLoopCount = 0, [...other lines redacted...]
.......
}
i use gdb debug the program , i find the process flow by
0347->0341->0347->0352->0341->0352 , it seems disordered, im really
puzzled

I am really puzzled why you're posting about it here. Tools are
generally off-topic. Try gnu.utils.help or gnu.g++.help. If your
program works as expected, why worry about "the order" (which is not
observable behaviour, from C++ point of view). If your program does
not work as expected, read FAQ 5.8 and follow its instructions.

V
 
P

Phlip

freegnu said:
i use gdb debug the program , i find the process flow by
0347->0341->0347->0352->0341->0352 , it seems disordered, im really
puzzled

You will get the best answer on a gdb forum. (This one is only qualified to
discuss the raw C++ language itself.)

My experience running gdb through ddd (its GUI front-end) is you simply
can't trust the control-flow point, and it will jump around mysteriously in
the source.

Try writing unit tests for your code, and you won't need a debugger any
more.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top