×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Apr 2008
    Posts
    12

    Problem with debugging of source code for Symscan tool

    Hi all,
    I have intalled the symscan tool and i am running the source code for this tool in Visual studio 2005.I want to debug the code, so i am trying to do it with the help of break points.At this line of source code debugging cant be continued and it is returning back to the same point.I am attaching the source code with that point where it is exiting and returning back to the point in main.cpp

    Scanner.cpp
    void Scanner::ProcessCommandLine(int argc, char* argv[])
    {
    iFileName = argv[argc -1];

    if (argc < 2 || strcmp("-H", argv[1]) == 0 || strcmp("-h", argv[1]) == 0)
    {
    //cout << "\nSymScan v1.0" << endl << endl;
    cout << "Usage:" << endl;
    cout << "\tMemoryManagementTool.exe [-C|-D|-S|-L|-A] [-H] <filename>" << endl << endl;
    cout << "\t-H : Displays this help" << endl;
    cout << "\t-C : Scan for CleanupStack violations" << endl;
    cout << "\t-D : Scan for misuse of descriptors " << endl;
    cout << "\t-S : Scan for standards violations i.e. deprecated _L()" << endl;
    cout << "\t-L : LeaveScan will be executed after MemoryManagement tool." << endl;
    cout << "\t-A : Perform all scans" << endl;
    exit(0);
    }
    the break point is returning back to the main in this point and it will be inside the loop.
    Also attached is the souce code for main function.

    main.cpp
    int main(int argc, char* argv[])
    {
    char* fileName = argv[argc - 1];
    Scanner scanner;
    scanner.ProcessCommandLine(argc, argv);
    ifstream input(scanner.FileName());

    if (!input)
    {
    cout << "\n\nCouldn't open File\n" << endl;
    cout << "Press any key to finish....";
    char ch;
    ch = getchar();
    return 0;
    }

    SourceFilter cr(input);

    while (scanner.ProcessLine(cr));

    input.close();

    scanner.DisplayResults();
    scanner.RunLeaveScan();
    getchar();
    return 0;
    }

    Can any one tell me why cant i continue debugging?

    Thanks in advance,
    Lavanya

  2. #2
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,692

    Re: Problem with debugging of source code for Symscan tool

    exit(0) is not Symbian-related, and it simply exits from the application.
    This is not a big surprise anyway: as you can see, the help is displayed when either it was explicitly asked (by -h or -H), or the number of arguments is not enough.
    Specify a proper command line argument in the debug configuration.

Similar Threads

  1. why my application icon doesn't appear?
    By Zefa in forum Symbian User Interface
    Replies: 8
    Last Post: 2007-03-15, 10:50
  2. carbide.vs: Bug in invocation of mwccsym2.exe?
    By timosteuerwald in forum Symbian Tools & SDKs
    Replies: 5
    Last Post: 2006-12-05, 15:14
  3. Debugging problem with CW 3.1
    By madsum in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 12
    Last Post: 2006-03-13, 07:58
  4. Help! Basic TCP connection - Source code attached
    By dineshguru in forum Symbian Networking & Messaging (Closed)
    Replies: 0
    Last Post: 2002-10-10, 05:01
  5. problem with Nokia Toolkit 3.1 and binary code for MMS
    By alinesimon in forum General Messaging
    Replies: 1
    Last Post: 2002-08-09, 06:40

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×