[llvm-bugs] [Bug 24384] New: Python API: Connecting to remote server leaves the process in unloaded state
via llvm-bugs
llvm-bugs at lists.llvm.org
Thu Aug 6 12:10:43 PDT 2015
https://llvm.org/bugs/show_bug.cgi?id=24384
Bug ID: 24384
Summary: Python API: Connecting to remote server leaves the
process in unloaded state
Product: lldb
Version: 3.7
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: All Bugs
Assignee: lldb-dev at cs.uiuc.edu
Reporter: john.ch.fr at gmail.com
CC: llvm-bugs at lists.llvm.org
Classification: Unclassified
Tested using the svn revision 244212 (3.8.0).
Everything works fine in lldb's CLI. The issue is only with the Python API.
After getting connected, the process is left in "unloaded" state.
The same thing happened with the stable 3.6.2 release too.
=== server output ===
$ lldb-server g :1234 target/debug/des
using the default platform: host
Launched 'target/debug/des' as process 22203...
lldb-server-local_buildListening to port 1234 for a connection from
localhost...
Connection established.
=== python try 1 ===
>>> import lldb
>>> d = lldb.SBDebugger.Create()
>>> t = d.CreateTargetWithFileAndArch(None, None)
>>> l = lldb.SBListener()
>>> e = lldb.SBError()
>>> p = t.ConnectRemote(l, "connect://localhost:1234", None, e)
>>> s = lldb.SBStream()
>>> p.GetDescription(s)
True
>>> print s.GetData()
SBProcess: pid = 22203, state = unloaded, threads = 1, executable = des
=== try 2: using command interpretter ===
>>> import lldb
>>> d = lldb.SBDebugger.Create()
>>> ci = d.GetCommandInterpreter()
>>> cro = lldb.SBCommandReturnObject()
>>> ci.HandleCommand('gdb-remote 1234', cro)
1
>>> ci.HandleCommand('process status', cro)
1
>>> print cro.GetOutput()
Process 16338 unloaded
* thread #1: tid = 16338, 0x00007f6764d99d80, name = 'des', stop reason =
signal SIGSTOP
frame #0: 0x00007f6764d99d80
-> 0x7f6764d99d80: movq %rsp, %rdi
0x7f6764d99d83: callq 0x7f6764d9db10
0x7f6764d99d88: movq %rax, %r12
0x7f6764d99d8b: movl 0x220ec7(%rip), %eax
>>> ci.HandleCommand('process continue', cro)
6
>>> print cro.GetError()
error: Process must be launched.
>>> ci.HandleCommand('process launch', cro)
There is a running process, kill it and restart?: [Y/n] n
6
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20150806/ecdc07df/attachment.html>
More information about the llvm-bugs
mailing list