Hi.

I'm seeing a python back trace when I attempt to debug from a core dump
file. I create a core by building and running the following code:

int main()
{
int* p = 0;
*p = 20;
}
gcc -o test test.cpp
./test

And I'm starting pyclewn with

python -m clewn -e vim -l nbdebug -f out.2
 --or--
python3 -m clewn -e vim -l nbdebug -f out.3

And run the following commands from inside vim:

  :Cfile ./test
  :C core-file core

I see a "Connection reset by peer" error flash on screen and the following
back trace is written to the log. (Note, the python3 back trace is very
similar but uses asyncio not trollius.)

<--- loads cut --->

58.538 nb   NBDEBUG +++
58.538 nb   NBDEBUG @@ -0,0 +1 @@
58.538 nb   NBDEBUG +* #0   in main
58.538 nb   NBDEBUG 3:startAtomic!53
58.538 nb   NBDEBUG 3:setReadOnly!54 F
58.538 nb   NBDEBUG 3:insert/55 0 "* #0   in main\n"
58.538 nb   NBDEBUG 3:setReadOnly!56 T
58.538 nb   NBDEBUG 5:setDot!57 1/0
58.538 nb   NBDEBUG 3:endAtomic!58
58.538 nb   NBDEBUG 4:editFile!59 "(clewn)_threads"
58.538 nb   NBDEBUG 4:setReadOnly!60 T
58.538 trol ERROR   Exception in callback _read_ready()
handle: <Handle _read_ready() created at
/usr/local/lib/python2.7/dist-packages/trollius/selector_events.py:201>
source_traceback: Object created at (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/usr/local/lib/python2.7/dist-packages/clewn/__main__.py", line 10,
in <module>
    vim.main()
  File "/usr/local/lib/python2.7/dist-packages/clewn/vim.py", line 228, in
main
    loop=vim.loop)
  File "/usr/local/lib/python2.7/dist-packages/clewn/misc.py", line 223, in
cancel_after_first_completed
    loop.run_until_complete(main_task)
  File "/usr/local/lib/python2.7/dist-packages/trollius/base_events.py",
line 288, in run_until_complete
    self.run_forever()
  File "/usr/local/lib/python2.7/dist-packages/trollius/base_events.py",
line 260, in run_forever
    self._run_once()
  File "/usr/local/lib/python2.7/dist-packages/trollius/base_events.py",
line 1116, in _run_once
    handle._run()
  File "/usr/local/lib/python2.7/dist-packages/trollius/events.py", line
151, in _run
    self._callback(*self._args)
  File "/usr/local/lib/python2.7/dist-packages/trollius/tasks.py", line
255, in _step
    result = next(coro)
  File "/usr/local/lib/python2.7/dist-packages/trollius/base_events.py",
line 638, in _create_connection_transport
    transport = self._make_socket_transport(sock, protocol, waiter)
  File
"/usr/local/lib/python2.7/dist-packages/trollius/selector_events.py", line
78, in _make_socket_transport
    extra, server)
  File
"/usr/local/lib/python2.7/dist-packages/trollius/selector_events.py", line
579, in __init__
    self._loop.add_reader(self._sock_fd, self._read_ready)
  File
"/usr/local/lib/python2.7/dist-packages/trollius/selector_events.py", line
201, in add_reader
    handle = events.Handle(callback, args, self)
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/trollius/events.py", line
151, in _run
    self._callback(*self._args)
  File
"/usr/local/lib/python2.7/dist-packages/trollius/selector_events.py", line
614, in _read_ready
    self._protocol.data_received(data)
  File "/usr/local/lib/python2.7/dist-packages/clewn/process.py", line 153,
in data_received
    misc.handle_as_lines(data, self.ibuff, self.handle_line)
  File "/usr/local/lib/python2.7/dist-packages/clewn/misc.py", line 199, in
handle_as_lines
    handle_cb(line)
  File "/usr/local/lib/python2.7/dist-packages/clewn/gdb.py", line 786, in
handle_line
    self.process_mi_record(matchobj)
  File "/usr/local/lib/python2.7/dist-packages/clewn/gdb.py", line 834, in
process_mi_record
    self.process_oob()
  File "/usr/local/lib/python2.7/dist-packages/clewn/gdb.py", line 874, in
process_oob
    self.terminate_cmd()
  File "/usr/local/lib/python2.7/dist-packages/clewn/gdb.py", line 741, in
terminate_cmd
    self.info.threads_dirty)
  File "/usr/local/lib/python2.7/dist-packages/clewn/debugger.py", line
554, in update_listbuffer
    lbuf.update(getdata())
  File "/usr/local/lib/python2.7/dist-packages/clewn/gdbmi.py", line 619,
in collect_threads
    ' %(target-id)s' % thread)
KeyError: u'name'
58.539 vim  INFO    got signal None
58.540 misc INFO    <Task finished coro=<run() done, defined at
/usr/local/lib/python2.7/dist-packages/clewn/vim.py:620> result=None
created at /usr/local/lib/python2.7/dist-packages/clewn/vim.py:226>
58.819 vim  DEBUG   Vim instance:

<--- loads cut --->

If I run the program from inside vim debugging works as expected. I can
provide the full outputs of python and python3  runs if needed.

I'm using:

pyclewn: 2.0.1
vim: 7.4
ubuntu: 14.04
gcc: 4.8.2


Many thanks  for a great program,

Steve
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Pyclewn-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pyclewn-general

Reply via email to