Comments (10)
I'm not so sure what's going wrong... Try increasing the delay to 2 seconds here and rerun the tests.
If that doesn't work, add this line:
self.logger.info(method.__name__, args)
below this line, try reproducing this error, and give me the whole log as text.
from lldb.nvim.
Added delay as 2
and added the logger method. I also modified my $PATH
so python2
is will be run from the system directory.
From the terminal buffer
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading
.py", line 810, in __bootstrap_inner
self.run
File "/Users/tsliwkan/config/nvim/plugged/lldb.nvim/rplugin/python/lldb_nvim/controlle
r.py", line 286, in run
out += self._process.GetSTDERR(256)
TypeError: unsupported operand type(s) for +=: 'NoneType' and 'NoneType'
Traceback (most recent call last):
File "test.py", line 40, in <module>
iface._exec('continue')
File "/Users/tsliwkan/config/nvim/plugged/lldb.nvim/rplugin/python/lldb_nvim/__init__.
py", line 41, in _exec
self.ctrl.safe_execute(args)
File "/Users/tsliwkan/config/nvim/plugged/lldb.nvim/rplugin/python/lldb_nvim/controlle
r.py", line 93, in safe_execute
self.safe_call(self.exec_command, [cmd])
File "/Users/tsliwkan/config/nvim/plugged/lldb.nvim/rplugin/python/lldb_nvim/controlle
r.py", line 86, in safe_call
raise EventLoopError("Dead event loop!")
EventLoopError: Dead event loop!
Debugger terminated! If you see no errors, everything's cool!
and from test.log
2016-04-16 14:40:13,647 [INFO @ controller.py:safe_call:69] 3032 - handle
2016-04-16 14:40:13,647 [INFO @ controller.py:run:275] 3032 - Calling handle with ['load', 'lldb-nvim.json']
2016-04-16 14:40:13,649 [INFO @ vim_x.py:call:19] 3032 - ('lldb#layout#init_buffers',)
2016-04-16 14:40:15,648 [INFO @ controller.py:safe_call:69] 3032 - mode_setup
2016-04-16 14:40:15,648 [INFO @ controller.py:run:275] 3032 - Calling mode_setup with ['debug']
2016-04-16 14:40:16,265 [INFO @ vim_x.py:call:19] 3032 - ('bufnr', '/Users/tsliwkan/config/nvim/plugged/lldb.nvim/test/ab.c', 1)
2016-04-16 14:40:16,265 [INFO @ vim_x.py:call:19] 3032 - ('setbufvar', 2, '&bl', 1)
2016-04-16 14:40:16,266 [INFO @ vim_x.py:call:19] 3032 - ('bufnr', '/Users/tsliwkan/config/nvim/plugged/lldb.nvim/test/ab.c', 1)
2016-04-16 14:40:16,266 [INFO @ vim_x.py:call:19] 3032 - ('setbufvar', 2, '&bl', 1)
2016-04-16 14:40:16,266 [INFO @ vim_x.py:call:19] 3032 - ('bufnr', '/Users/tsliwkan/config/nvim/plugged/lldb.nvim/test/ab.c', 1)
2016-04-16 14:40:16,267 [INFO @ vim_x.py:call:19] 3032 - ('setbufvar', 2, '&bl', 1)
2016-04-16 14:40:19,652 [INFO @ controller.py:safe_call:69] 3032 - exec_command
2016-04-16 14:40:21,654 [INFO @ controller.py:safe_call:69] 3032 - put_stdin
2016-04-16 14:40:23,656 [INFO @ controller.py:safe_call:69] 3032 - exec_command
2016-04-16 14:40:23,657 [CRITICAL @ controller.py:safe_call:85] 3032 - Event loop thread is probably dead!
from lldb.nvim.
Oops, the above test.log
output is from
self.logger.info(method.__name__)
if I add the args
argument I get
Note: `:LL-` commands are not bound with this test instance
Traceback (most recent call last):
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/logging/_
_init__.py", line 859, in emit
msg = self.format(record)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/logging/_
_init__.py", line 732, in format
return fmt.format(record)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/logging/_
_init__.py", line 471, in format
record.message = record.getMessage()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/logging/_
_init__.py", line 335, in getMessage
msg = msg % self.args
TypeError: not all arguments converted during string formatting
Logged from file controller.py, line 69
from lldb.nvim.
Ah! It was not the problem with delay. GetSTDOUT
here is returning None
. I don't know why it does... Try inserting this condition in-between those lines:
out = self._process.GetSTDOUT(256)
if out is None:
break
out += self._process.GetSTDERR(256)
And check if you're able to work with the plugin, and the process stdout is getting printed...
from lldb.nvim.
Oops, the above
test.log
output is from
Ya, that was a mistake from my part. Remove that line... (I forgot that str(args)
was required)
from lldb.nvim.
OK. I think this is working now. I changed controller.py
a little bit more from your suggestion, the block in question now looks like
out = ''
stdout = self._process.GetSTDOUT(256)
if stdout is not None:
out += stdout
stderr = self._process.GetSTDERR(256)
if stderr is not None:
out += stderr
if len(out) == 0:
break
as I was still getting an error with +=
on str
and None
types from self._process.GetSTDERR(256)
. test/run.sh
passed now, the term window outputs
Note: `:LL-` commands are not bound with this test instance
Debugger terminated! If you see no errors, everything's cool!
>>>
I also fired up my own "Hello world" in C, running the commands
:LLsession new
:LLmode debug
:LL continue
and the process exited with code 0!
from lldb.nvim.
Is "Hello world" actually printed in the log buffer? I'm guessing the debugger is not getting any process outputs now.
from lldb.nvim.
In the pane [lldb]logs
(lldb) target create a.out
Current executable set to 'a.out' (x86_64).
(lldb) breakpoint set -n main
Breakpoint 1: where = a.out`main, address = 0x0000000100000f50
(lldb) process launch
Process 3295 launched: '/Users/tsliwkan/development/a.out' (x86_64)
(lldb) continue
Process 3295 resuming
Hello, world!
from lldb.nvim.
Okay, great!! I'll push that fix soon...
from lldb.nvim.
Cheers! Thanks for the prompt replies. Also, thanks for your work on this plugin, it looks super slick.
from lldb.nvim.
Related Issues (20)
- Breakpoints don't work when symbolic links are involved in the path to working directory
- A fork to support Vim-with-channels HOT 3
- Complain about unsaved session file after `:LLsession show`? HOT 3
- `target.source-map` is not working properly
- Loading coredumps HOT 2
- Breakpoint issues when a shared library is using in macOS Sierra HOT 8
- How to debug an interactive command line application? HOT 7
- Way of detecting through vimscript what mode nvim is in HOT 1
- UpdateRemotePlugins throws error HOT 25
- Breakpoint symbols not visible HOT 2
- Move the repository to an organization HOT 6
- Can I use terminal command just like ConqueGDB? HOT 1
- Issues with frame variable when examining std::vector HOT 6
- Multithread debug issues HOT 9
- It do not accept LL commands. and then happened EventLoopError. HOT 4
- Possible index out of range error
- README does not mention this repo in the install section HOT 1
- After installation, LL commands are not recognized HOT 2
- process interrupt not working unless a breakpoint has been hit HOT 3
- Upstream bugs! HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lldb.nvim.