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

Reply With Quote

