示例#1
0
bool DebuggerShell::clearBreakpoint(const std::string& file, int line) {
  intptr_t sourceID;
  if (!resolveFileName(file, &sourceID)) {
    return false;
  }
  return breakpoints_.erase(SourceLine(sourceID, line)) != 0;
}
示例#2
0
bool DebuggerShell::setBreakpoint(const std::string& file, int line) {
  intptr_t sourceID;
  if (!resolveFileName(file, &sourceID)) {
    return false;
  }
  breakpoints_.insert(SourceLine(sourceID, line));
  return true;
}
示例#3
0
bool DebuggerShell::currentlyOnBreakpoint() {
  // check to see if this line has a breakpoint set.
  BTFrame& current_frame = backtrace_.back();
  BreakpointSet::iterator it = breakpoints_.find(SourceLine(current_frame.sourceID, current_frame.lineNumber));
  if (it != breakpoints_.end()) {
    return true;
  }

  return false;
}
示例#4
0
void GpsimDebugger::associateLine( const QString & sourceFile, int sourceLine, const QString & assemblyFile, int assemblyLine )
{
	if ( assemblyLine < 0 || sourceLine < 0 )
	{
		qWarning() << "Invalid lines: assemblyLine="<<assemblyLine<<" sourceLine="<<sourceLine<<endl;
		return;
	}

	SourceLine hllSource = SourceLine( sourceFile, sourceLine );
	SourceLine asmSource = SourceLine( assemblyFile, assemblyLine );

	if ( m_sourceLineMap.contains(asmSource) )
	{
		qWarning() << "Already have an association for assembly (\""<<assemblyFile<<"\","<<assemblyLine<<")"<<endl;
		return;
	}

	m_sourceLineMap[asmSource] = hllSource;
}
示例#5
0
std::string SourceLocation::position() const {
    std::string position(source_file_->filename());
    SourceFile::Position pos;
    SourceLine(&pos);
    position.push_back(':');
    position.append(std::to_string(pos.line));
    position.push_back(':');
    position.append(std::to_string(pos.column));
    return position;
}
示例#6
0
SourceLine GpsimDebugger::currentLine()
{
	DebugLine * dl = currentDebugLine();
	return dl ? *dl : SourceLine();
}