<div dir="ltr">Ok, thanks for all the info, it's really helpful. We may instead pursue running lldb from the toolchain downloaded from the swift website within our process for the time being and skip having it work in unison with Xcode. We've been having trouble setting that up too however but it's already being discussed in a different email thread :)</div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Oct 7, 2016 at 12:29 PM, Jim Ingham <span dir="ltr"><<a href="mailto:jingham@apple.com" target="_blank">jingham@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Enrico is right. At present, each connection to the lldb-rpc-server gets its own SBDebugger, so you wouldn't be able to talk to the debugger that Xcode is using for its process.<br>
<br>
Even if that was changed, then you'd run into other problems, for instance, at present only one Listener can wait for process events from the debugger, so you would not be able to control execution or coordinate with Xcode's running of the process. But this is probably just the tip of the iceberg of things that would go wrong if you try to do this.<br>
<br>
If you have lots of resources to devote to hacking on lldb itself, I'm sure you could make this work, but this is a very tricky part of lldb, so the engineering work would be non-trivial to say the least. I don't know your circumstances, but I doubt it would end up being worthwhile for you.<br>
<br>
Enrico's suggestion of making Python commands to do the job is probably the best way to go.<br>
<br>
Note, it used to be tricky to get a plain command tool (lldb-rpc-server) to connect to the Window Server and put up UI. I haven't tried that since I worked on Tcl/Tk way back in the day, so it may be easier now. But you should probably also experiment with that to make sure that's possible before you go too far down this route.<br>
<span class="HOEnZb"><font color="#888888"><br>
Jim<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
<br>
> On Oct 7, 2016, at 12:05 PM, Rex Fenley via lldb-dev <<a href="mailto:lldb-dev@lists.llvm.org">lldb-dev@lists.llvm.org</a>> wrote:<br>
><br>
> <a href="https://media4.giphy.com/media/l2Je27KfKp8x71qAo/200.gif" rel="noreferrer" target="_blank">https://media4.giphy.com/<wbr>media/l2Je27KfKp8x71qAo/200.<wbr>gif</a><br>
><br>
> On Fri, Oct 7, 2016 at 12:01 PM, Enrico Granata <<a href="mailto:egranata@apple.com">egranata@apple.com</a>> wrote:<br>
> It is my understanding that this is not possible in the current architecture<br>
><br>
>> On Oct 7, 2016, at 11:55 AM, Rex Fenley <<a href="mailto:rex@remind101.com">rex@remind101.com</a>> wrote:<br>
>><br>
>> We expect to have a rich user experience as this tool progresses, using Python to generate UI will limit our development process. It would be much simpler if we could communicate with Xcode's lldb directly from our application.<br>
>><br>
>> On Fri, Oct 7, 2016 at 11:33 AM, Enrico Granata <<a href="mailto:egranata@apple.com">egranata@apple.com</a>> wrote:<br>
>> I can see a couple of avenues for your use case:<br>
>><br>
>> - you can write custom LLDB commands (obligatory reference: <a href="http://lldb.llvm.org/python-reference.html" rel="noreferrer" target="_blank">http://lldb.llvm.org/python-<wbr>reference.html</a>) and have your users type these via the console instead of by clicking buttons<br>
>> - you could write a Python script that pops up extra UI and have your buttons run as part of LLDB that way. I have admittedly never tried to do this, and it might require some tinkering, but in theory I believe it should be possible<br>
>><br>
>> Personally, I'd rather much have console commands I can type instead of a magic separate UI that might even be hidden underneath other windows or hiding useful information unless I drag it out of the way, but then it's annoying to reach for when I need it, ..., but that's me...<br>
>><br>
>>> On Oct 7, 2016, at 11:27 AM, Rex Fenley <<a href="mailto:rex@remind101.com">rex@remind101.com</a>> wrote:<br>
>>><br>
>>> I'm trying to build a separate debugging tool that can be used in unison with Xcode it will provide buttons that are shortcuts to lldb scripts we write.<br>
>>><br>
>>> On Fri, Oct 7, 2016 at 10:45 AM, Enrico Granata <<a href="mailto:egranata@apple.com">egranata@apple.com</a>> wrote:<br>
>>> I am gonna echo Kate's question, but delve one level deeper<br>
>>><br>
>>> Why do you want to send commands to LLDB from a different process?<br>
>>><br>
>>> We have a bunch of different extension points in LLDB, so it's possible that what you're trying to do is actually already possible<br>
>>><br>
>>>> On Oct 7, 2016, at 10:41 AM, Rex Fenley via lldb-dev <<a href="mailto:lldb-dev@lists.llvm.org">lldb-dev@lists.llvm.org</a>> wrote:<br>
>>>><br>
>>>> Hi Kate,<br>
>>>><br>
>>>> I'm trying to connect to the running instance of lldb in Xcode to send commands to it from a different process :)<br>
>>>><br>
>>>> On Fri, Oct 7, 2016 at 10:27 AM, Kate Stone <<a href="mailto:k8stone@apple.com">k8stone@apple.com</a>> wrote:<br>
>>>> The RPC mechanism used in Xcode 8 is not a part of the open source LLDB project and should be treated as an implementation detail of Xcode. What are you trying to accomplish?<br>
>>>><br>
>>>> Kate Stone <a href="mailto:k8stone@apple.com">k8stone@apple.com</a><br>
>>>> Xcode Low Level Tools<br>
>>>><br>
>>>>> On Oct 6, 2016, at 6:11 PM, Rex Fenley via lldb-dev <<a href="mailto:lldb-dev@lists.llvm.org">lldb-dev@lists.llvm.org</a>> wrote:<br>
>>>>><br>
>>>>> Hi! I'm trying to connect to Xcode's lldb rpc server but I'm having trouble.<br>
>>>>><br>
>>>>> This doesn't seem to work to list the hosts.<br>
>>>>> rpcinfo -p lldb-rpc-server<br>
>>>>><br>
>>>>> Can't contact rpcbind on lldb-rpc-server<br>
>>>>><br>
>>>>><br>
>>>>> rpcinfo: RPC: Unknown host<br>
>>>>><br>
>>>>> Am I doing this correctly?<br>
>>>>><br>
>>>>> --<br>
>>>>> Rex Fenley | IOS DEVELOPER<br>
>>>>><br>
>>>>><br>
</div></div><span class="im HOEnZb">>>>>> Remind.com | BLOG | FOLLOW US | LIKE US<br>
>>>>> ______________________________<wbr>_________________<br>
>>>>> lldb-dev mailing list<br>
>>>>> <a href="mailto:lldb-dev@lists.llvm.org">lldb-dev@lists.llvm.org</a><br>
>>>>> <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/lldb-dev</a><br>
>>>><br>
>>>><br>
>>>><br>
>>>><br>
>>>> --<br>
>>>> Rex Fenley | IOS DEVELOPER<br>
>>>><br>
>>>><br>
</span><span class="im HOEnZb">>>>> Remind.com | BLOG | FOLLOW US | LIKE US<br>
>>>> ______________________________<wbr>_________________<br>
>>>> lldb-dev mailing list<br>
>>>> <a href="mailto:lldb-dev@lists.llvm.org">lldb-dev@lists.llvm.org</a><br>
>>>> <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/lldb-dev</a><br>
>>><br>
>>><br>
>>> Thanks,<br>
>>> - Enrico<br>
>>> 📩 egranata@.com ☎️ 27683<br>
>>><br>
>>><br>
>>><br>
>>><br>
>>> --<br>
>>> Rex Fenley | IOS DEVELOPER<br>
>>><br>
>>><br>
</span><span class="im HOEnZb">>>> Remind.com | BLOG | FOLLOW US | LIKE US<br>
>><br>
>><br>
>> Thanks,<br>
>> - Enrico<br>
>> 📩 egranata@.com ☎️ 27683<br>
>><br>
>><br>
>><br>
>><br>
>> --<br>
>> Rex Fenley | IOS DEVELOPER<br>
>><br>
>><br>
>> Remind.com | BLOG | FOLLOW US | LIKE US<br>
><br>
><br>
> Thanks,<br>
> - Enrico<br>
> 📩 egranata@.com ☎️ 27683<br>
><br>
><br>
><br>
><br>
> --<br>
> Rex Fenley | IOS DEVELOPER<br>
><br>
><br>
</span><div class="HOEnZb"><div class="h5">> Remind.com | BLOG | FOLLOW US | LIKE US<br>
> ______________________________<wbr>_________________<br>
> lldb-dev mailing list<br>
> <a href="mailto:lldb-dev@lists.llvm.org">lldb-dev@lists.llvm.org</a><br>
> <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/lldb-dev</a><br>
<br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><span><p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt"><span style="font-size:16px;font-family:Arial;background-color:transparent;font-style:italic;vertical-align:baseline;white-space:pre-wrap">Rex Fenley</span><span style="font-size:16px;font-family:Arial;background-color:transparent;vertical-align:baseline;white-space:pre-wrap"> </span><span style="font-size:11px;font-family:Arial;color:rgb(153,153,153);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">|</span><span style="line-height:1.15;font-family:Arial;color:rgb(153,153,153);background-color:transparent;vertical-align:baseline;white-space:pre-wrap"> </span><span style="font-size:11px;font-family:Arial;color:rgb(153,153,153);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">IOS DEVELOPER</span><br></p></span><span><br><p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11px;font-family:Arial;color:rgb(153,153,153);vertical-align:baseline;white-space:pre-wrap;background-color:transparent"><img src="https://lh5.googleusercontent.com/xMgzw3JkFL3DLkdwyq0WxJzKs_XP57gVVCaBMvgi1FKCjSeue0xdx3JZeCWBlxN4KRHhHOfdvJbc1N-AjTwXcKIq4cjJg9H7iaFpQ8WbO4N3c9Y5dzi19cPOs_owPquuqw" width="250px;" height="53px;" style="border:none"></span></p><p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt"><a href="https://www.remind.com/" style="text-decoration:none" target="_blank"><span style="font-size:11px;font-family:Arial;color:rgb(17,85,204);font-weight:bold;text-decoration:underline;vertical-align:baseline;white-space:pre-wrap;background-color:transparent">Remind.com</span></a><span style="font-family:Arial;vertical-align:baseline;white-space:pre-wrap;background-color:transparent"> </span><span style="font-size:11px;font-family:Arial;vertical-align:baseline;white-space:pre-wrap;background-color:transparent">| </span><a href="http://blog.remind.com/" style="text-decoration:none" target="_blank"><span style="font-size:11px;font-family:Arial;color:rgb(17,85,204);text-decoration:underline;vertical-align:baseline;white-space:pre-wrap;background-color:transparent">BLOG</span></a><span style="font-size:11px;font-family:Arial;vertical-align:baseline;white-space:pre-wrap;background-color:transparent"> | </span><a href="https://twitter.com/remindhq" style="text-decoration:none" target="_blank"><span style="font-size:11px;font-family:Arial;color:rgb(17,85,204);text-decoration:underline;vertical-align:baseline;white-space:pre-wrap;background-color:transparent">FOLLOW US</span></a><span style="font-size:11px;font-family:Arial;vertical-align:baseline;white-space:pre-wrap;background-color:transparent"> | </span><span style="font-family:Arial;vertical-align:baseline;white-space:pre-wrap;background-color:transparent"> </span><span style="text-decoration:underline;font-size:11px;font-family:Arial;color:rgb(17,85,204);vertical-align:baseline;white-space:pre-wrap;background-color:transparent"><a href="https://www.facebook.com/remindhq" style="text-decoration:none" target="_blank">LIKE US</a></span></p></span></div></div>
</div>