confused problem

Discussion in 'C++' started by freegnu, Oct 10, 2006.

  1. freegnu

    freegnu Guest

    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
    freegnu, Oct 10, 2006
    #1
    1. Advertising

  2. freegnu wrote:
    > 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
    --
    Please remove capital 'A's when replying by e-mail
    I do not respond to top-posted replies, please don't ask
    Victor Bazarov, Oct 10, 2006
    #2
    1. Advertising

  3. freegnu

    Phlip Guest

    freegnu wrote:

    > 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.

    --
    Phlip
    http://www.greencheese.us/ZeekLand <-- NOT a blog!!!
    Phlip, Oct 10, 2006
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. DJ Miller

    Confused and bewildered.

    DJ Miller, Jul 31, 2003, in forum: ASP .Net
    Replies:
    4
    Views:
    1,069
    DJ Miller
    Sep 4, 2003
  2. RichGK
    Replies:
    1
    Views:
    387
    SStory
    Jul 31, 2004
  3. Cobra Pilot

    Confused. Need Help!

    Cobra Pilot, Jul 22, 2003, in forum: Perl
    Replies:
    1
    Views:
    959
    Shawn Corey
    Jul 22, 2003
  4. freegnu

    confused problem

    freegnu, Oct 10, 2006, in forum: C Programming
    Replies:
    2
    Views:
    283
    jmcgill
    Oct 11, 2006
  5. Deryck
    Replies:
    7
    Views:
    94
Loading...

Share This Page