function! vebugger#gdb#searchAndAttach(binaryFile) let l:processId=vebugger#util#selectProcessOfFile(a:binaryFile) if 0&2') call vebugger#std#openShellBuffer(l:debugger) call l:debugger.writeLine('start') end call l:debugger.addReadHandler(function('s:readProgramOutput')) call l:debugger.addReadHandler(function('s:readWhere')) call l:debugger.addReadHandler(function('s:readFinish')) call l:debugger.addReadHandler(function('s:readEvaluatedExpressions')) call l:debugger.setWriteHandler('std','flow',function('s:writeFlow')) call l:debugger.setWriteHandler('std','breakpoints',function('s:writeBreakpoints')) call l:debugger.setWriteHandler('std','closeDebugger',function('s:closeDebugger')) call l:debugger.setWriteHandler('std','evaluateExpressions',function('s:requestEvaluateExpression')) call l:debugger.setWriteHandler('std','executeStatements',function('s:executeStatements')) call l:debugger.generateWriteActionsFromTemplate() call l:debugger.std_addAllBreakpointActions(g:vebugger_breakpoints) return l:debugger endfunction function! s:findFolderFromStackTrace(src,nameFromStackTrace) let l:path=a:src for l:dirname in split(a:nameFromStackTrace,'\.') let l:nextPath=l:path.'/'.fnameescape(l:dirname) if empty(glob(l:nextPath)) return l:path endif let l:path=l:nextPath endfor return l:path endfunction function! s:readProgramOutput(pipeName,line,readResult,debugger) if 'err'==a:pipeName \&&a:line!~'\v^[=~*&^]' \&&a:line!~'\V(gdb)' let a:readResult.std.programOutput={'line':a:line} endif endfunction function! s:readWhere(pipeName,line,readResult,debugger) if 'out'==a:pipeName "let l:matches=matchlist(a:line,'\v#(\d+)\s+(\S+)\s+\(.*\)\s+at\s+([^:]+):(\d+)') let l:matches=matchlist(a:line,'\v^\~"#(\d+)\s+(\S+)\s+\(.*\)\s+at\s+([^:]+):(\d+)') if 4