Merge branch 'develop'

This commit is contained in:
IdanArye 2014-06-10 22:13:15 +03:00
commit 99adadbde7
3 changed files with 16 additions and 4 deletions

View File

@ -6,7 +6,7 @@ function! vebugger#mdbg#searchAndAttach(binaryFile,srcpath)
endfunction
function! vebugger#mdbg#start(binaryFile,args)
let l:debugger=vebugger#std#startDebugger(shellescape(vebugger#util#getToolFullPath('mdbg','Mdbg.exe')))
let l:debugger=vebugger#std#startDebugger(shellescape(vebugger#util#getToolFullPath('mdbg','Mdbg')))
let l:debugger.state.mdbg={'breakpointNumbers':{}}
let l:debugger.readResultTemplate.mdbg={'breakpointBound':{}}
@ -53,6 +53,9 @@ function! vebugger#mdbg#start(binaryFile,args)
endfunction
function! s:findFilePath(src,fileName,methodName)
if vebugger#util#isPathAbsolute(a:fileName)
return fnamemodify(a:fileName,':p') "Return the normalized full path
endif
let l:path=fnamemodify(a:src,':p')
let l:files=glob(l:path.'**/'.a:fileName,0,1)
for l:dirname in split(a:methodName,'\.')
@ -73,7 +76,7 @@ endfunction
function! s:readWhere(pipeName,line,readResult,debugger)
if 'out'==a:pipeName
let l:matches=matchlist(a:line,'\v^\*(\d+)\.\s*([A-Za-z_.]+)\s*\(([A-Za-z_.]+):(\d+)\)')
let l:matches=matchlist(a:line,'\v^\*(\d+)\.\s*([A-Za-z0-9_.+<>]+)\s*\((.+):(\d+)\)')
if 3<len(l:matches)
let l:frameNumber=str2nr(l:matches[1])
let l:file=s:findFilePath(a:debugger.state.mdbg.srcpath,l:matches[3],l:matches[2])

View File

@ -94,3 +94,12 @@ function! vebugger#util#getToolFullPath(toolName,default)
return a:default
endif
endfunction
"Checks if the path is an absolute path
function! vebugger#util#isPathAbsolute(path)
if has('win32')
return a:path=~':' || a:path[0]=='%' "Absolute paths in Windows contain : or start with an environment variable
else
return a:path[0]=~'\v^[/~$]' "Absolute paths in Linux start with ~(home),/(root dir) or $(environment variable)
endif
endfunction

View File

@ -1,10 +1,10 @@
*vebugger.txt*
Author: Idan Arye <https://github.com/someboddy/>
Author: Idan Arye <https://github.com/idanarye/>
License: Same terms as Vim itself (see |license|)
Version: 1.1.0
Version: 1.1.1
INTRODUCTION *vebugger*