Closed minego closed 4 years ago
I found a solution. Calling this (using a helper function in my .vimrc) when I start the debugger makes it behave properly.
TSendCommand settings set frame-format frame #${frame.index}: ${ansi.fg.yellow}${frame.pc}${ansi.normal}{ ${module.file.basename}{\
${function.name-with-args}{${frame.no-debug}${function.pc-offset}}}}{ at ${ansi.fg.cyan}${line.file.fullpath}${ansi.normal}:${ansi.fg.yellow}${line.number}${ansi.normal}{:${ansi.fg.yellow}${line.column}${ansi.normal}}}{${function.is-optimized} [opt]}{${frame.is-artificial} [artificial]}\n
`
I also set the following to make lldb more usable with this plugin
TSendCommand settings set stop-line-count-before 0
TSendCommand settings set stop-line-count-after 0
It seems like the plugin should change these settings automatically.
I will check it later.
If I step into a function while debugging in lldb the frame line is printed, which is matched by the locate_pattern in the plugin and the correct source is displayed, unless that source file is not in vim's current working directory.
This makes it very difficult to use this to debug large projects. There is a "source info" command in lldb that will print the entire path, but it does not get printed automatically as you debug.
Perhaps there is some way that I haven't discovered yet to get lldb to print full paths, in stack frames or to get it to print the source info output when a stack frame changes. I'll keep experimenting and if I find a solution I will add comments here, and possibly submit a pull request.