diff --git a/autoload/vebugger/gdb.vim b/autoload/vebugger/gdb.vim index 60a5a48..b563b5b 100644 --- a/autoload/vebugger/gdb.vim +++ b/autoload/vebugger/gdb.vim @@ -5,6 +5,7 @@ function! vebugger#gdb#start(binaryFile,args) \: 'gdb '.fnameescape(a:binaryFile))) let l:debugger.state.gdb={} + call l:debugger.writeLine("set width 0") call l:debugger.writeLine("define hook-stop\nwhere\nend") call l:debugger.writeLine("start") diff --git a/autoload/vebugger/jdb.vim b/autoload/vebugger/jdb.vim index 6d1a72a..ad329fa 100644 --- a/autoload/vebugger/jdb.vim +++ b/autoload/vebugger/jdb.vim @@ -19,6 +19,7 @@ function! vebugger#jdb#start(entryClass,args) call l:debugger.writeLine('monitor where') call l:debugger.addReadHandler(function('s:readWhere')) + call l:debugger.addReadHandler(function('s:readException')) call l:debugger.addReadHandler(function('s:readEvaluatedExpressions')) call l:debugger.setWriteHandler('std','flow',function('s:writeFlow')) @@ -65,6 +66,16 @@ function! s:readWhere(pipeName,line,readResult,debugger) endif endfunction +function! s:readException(pipeName,line,readResult,debugger) + if 'out'==a:pipeName + let l:matches=matchlist(a:line,'\vException occurred:\s+(\S+)') + if 1