Merge branch 'feature/mdbg-support-when-using-full-paths' into develop
This commit is contained in:
commit
0a5bccac0f
@ -6,7 +6,7 @@ function! vebugger#mdbg#searchAndAttach(binaryFile,srcpath)
|
|||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! vebugger#mdbg#start(binaryFile,args)
|
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.state.mdbg={'breakpointNumbers':{}}
|
||||||
let l:debugger.readResultTemplate.mdbg={'breakpointBound':{}}
|
let l:debugger.readResultTemplate.mdbg={'breakpointBound':{}}
|
||||||
|
|
||||||
@ -53,6 +53,9 @@ function! vebugger#mdbg#start(binaryFile,args)
|
|||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:findFilePath(src,fileName,methodName)
|
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:path=fnamemodify(a:src,':p')
|
||||||
let l:files=glob(l:path.'**/'.a:fileName,0,1)
|
let l:files=glob(l:path.'**/'.a:fileName,0,1)
|
||||||
for l:dirname in split(a:methodName,'\.')
|
for l:dirname in split(a:methodName,'\.')
|
||||||
@ -73,7 +76,7 @@ endfunction
|
|||||||
|
|
||||||
function! s:readWhere(pipeName,line,readResult,debugger)
|
function! s:readWhere(pipeName,line,readResult,debugger)
|
||||||
if 'out'==a:pipeName
|
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)
|
if 3<len(l:matches)
|
||||||
let l:frameNumber=str2nr(l:matches[1])
|
let l:frameNumber=str2nr(l:matches[1])
|
||||||
let l:file=s:findFilePath(a:debugger.state.mdbg.srcpath,l:matches[3],l:matches[2])
|
let l:file=s:findFilePath(a:debugger.state.mdbg.srcpath,l:matches[3],l:matches[2])
|
||||||
|
@ -94,3 +94,12 @@ function! vebugger#util#getToolFullPath(toolName,default)
|
|||||||
return a:default
|
return a:default
|
||||||
endif
|
endif
|
||||||
endfunction
|
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
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
Author: Idan Arye <https://github.com/idanarye/>
|
Author: Idan Arye <https://github.com/idanarye/>
|
||||||
License: Same terms as Vim itself (see |license|)
|
License: Same terms as Vim itself (see |license|)
|
||||||
|
|
||||||
Version: 1.1.0
|
Version: 1.1.1
|
||||||
|
|
||||||
INTRODUCTION *vebugger*
|
INTRODUCTION *vebugger*
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user