示例#1
0
void debug_script( const arguments &args )
{
    const path script( absolute( path( args[ 2 ] ), cwd() ) );

    Config config( get_config() );

    const string exe( get_executable( config, script, debug ).string() );

    const string debug_script( debug_script_path( config, script ).string() );

    ofstream stream( debug_script.c_str() );

    stream << "file " << exe << endl
                 << "r ";
    for ( size_t i = 3; i < args.size(); ++i )
    {
        stream << args[ i ] << ' ';
    }
    stream << endl << "q" << endl;

    stream.close();

    // for some reason, lldb won't start in execv
    exit( system( ( config.debugCommand() + " -s " + debug_script ).c_str() ) );
//	execv( config.debugCommand().c_str(), argv + 1 );
}
示例#2
0
void FileSystem::checkArgumentsCount(arguments arg, size_t minArgumentsCount) const
{
    if(arg.size() < minArgumentsCount) {
        throw not_enough_arguments_exception(arg.size(), minArgumentsCount);
    }
}