From ff2a8207d8448f07a5396b3dc4de8b235797a12f Mon Sep 17 00:00:00 2001 From: IdanArye Date: Mon, 9 Jun 2014 21:36:38 +0300 Subject: [PATCH 1/6] Add a function that checks if a path is full or relative --- autoload/vebugger/util.vim | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/autoload/vebugger/util.vim b/autoload/vebugger/util.vim index 67f4dac..3146932 100644 --- a/autoload/vebugger/util.vim +++ b/autoload/vebugger/util.vim @@ -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 From 2438ac6ccef937c659e670e499ac15844a8c5a6e Mon Sep 17 00:00:00 2001 From: IdanArye Date: Mon, 9 Jun 2014 21:37:48 +0300 Subject: [PATCH 2/6] This should do the trick! --- autoload/vebugger/mdbg.vim | 3 +++ 1 file changed, 3 insertions(+) diff --git a/autoload/vebugger/mdbg.vim b/autoload/vebugger/mdbg.vim index e1b7611..77883e9 100644 --- a/autoload/vebugger/mdbg.vim +++ b/autoload/vebugger/mdbg.vim @@ -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,'\.') From dbe939096c5b631a82bd99adf1c05bc75f5688c1 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 10 Jun 2014 10:37:14 +0300 Subject: [PATCH 3/6] Fixed the regex for MDBG file path parsing --- autoload/vebugger/mdbg.vim | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/autoload/vebugger/mdbg.vim b/autoload/vebugger/mdbg.vim index 77883e9..d0b226f 100644 --- a/autoload/vebugger/mdbg.vim +++ b/autoload/vebugger/mdbg.vim @@ -53,8 +53,8 @@ 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 + 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) @@ -76,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-z_.]+)\s*\((.+):(\d+)\)') if 3 Date: Tue, 10 Jun 2014 10:42:37 +0300 Subject: [PATCH 4/6] Remove the .exe extension from the default Mdbg - Windows doesnt need itdel C:\Users\IdanA\AppData\Local\Temp/.vimtmp/*~ --- autoload/vebugger/mdbg.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoload/vebugger/mdbg.vim b/autoload/vebugger/mdbg.vim index d0b226f..be2c3d3 100644 --- a/autoload/vebugger/mdbg.vim +++ b/autoload/vebugger/mdbg.vim @@ -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':{}} From 854f86d067f2f433237951e40ae9eac5a18ad4d9 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 10 Jun 2014 11:45:24 +0300 Subject: [PATCH 5/6] Added more supported characters to method full name in MDBG where parsing --- autoload/vebugger/mdbg.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoload/vebugger/mdbg.vim b/autoload/vebugger/mdbg.vim index be2c3d3..6ac5659 100644 --- a/autoload/vebugger/mdbg.vim +++ b/autoload/vebugger/mdbg.vim @@ -76,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*\((.+):(\d+)\)') + let l:matches=matchlist(a:line,'\v^\*(\d+)\.\s*([A-Za-z0-9_.+<>]+)\s*\((.+):(\d+)\)') if 3 Date: Tue, 10 Jun 2014 22:05:15 +0300 Subject: [PATCH 6/6] Bumped the bugfix version --- doc/vebugger.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/vebugger.txt b/doc/vebugger.txt index 93664f9..6a7df10 100644 --- a/doc/vebugger.txt +++ b/doc/vebugger.txt @@ -4,7 +4,7 @@ Author: Idan Arye License: Same terms as Vim itself (see |license|) -Version: 1.1.0 +Version: 1.1.1 INTRODUCTION *vebugger*