| 800 | } |
| 801 | |
| 802 | void CDebugger::AddFileBreakPoint(const string &file, int lineNbr) |
| 803 | { |
| 804 | // Store just file name, not entire path |
| 805 | size_t r = file.find_last_of("\\/"); |
| 806 | string actual; |
| 807 | if( r != string::npos ) |
| 808 | actual = file.substr(r+1); |
| 809 | else |
| 810 | actual = file; |
| 811 | |
| 812 | // Trim the file name |
| 813 | size_t b = actual.find_first_not_of(" \t"); |
| 814 | size_t e = actual.find_last_not_of(" \t"); |
| 815 | actual = actual.substr(b, e != string::npos ? e-b+1 : string::npos); |
| 816 | |
| 817 | stringstream s; |
| 818 | s << "Setting break point in file '" << actual << "' at line " << lineNbr << endl; |
| 819 | Output(s.str()); |
| 820 | |
| 821 | BreakPoint bp(actual, lineNbr, false); |
| 822 | m_breakPoints.push_back(bp); |
| 823 | } |
| 824 | |
| 825 | void CDebugger::PrintHelp() |
| 826 | { |