Re: [lldb-dev] LLDB Process Attach Failed When Waiting

2018-06-07 Thread Ryan Lovelett via lldb-dev
> sleep_for is definitely better than usleep because of portability (and > we use it elsewhere already). Okay that is what I went with. > Could you attach the patch to phabricator instead > ? It's easier to make > comments and iterate there. When you uplo

Re: [lldb-dev] LLDB Process Attach Failed When Waiting

2018-06-06 Thread Ryan Lovelett via lldb-dev
I'm attaching the first cut of the patch that I think is worth sharing for feedback. There is more work to do with regard to documentation and tests. Any feedback is appreciated. I am going to do my best and follow the steps listed in the "LLVM Developer Policy" as this continues forward. Greg

Re: [lldb-dev] LLDB Process Attach Failed When Waiting

2018-06-06 Thread Ryan Lovelett via lldb-dev
> Sleep is used to make the system sleep the current thread a little bit > between polling for processes by name. If the sleep isn't there, we will > light up a CPU with really quick polling for the processes by name, so > we should use usleep() which take a sleep amount in microseconds to not

Re: [lldb-dev] LLDB Process Attach Failed When Waiting

2018-06-06 Thread Ryan Lovelett via lldb-dev
Huzzah! I have a working proof of concept. A few more questions (I hope I'm not wearing out my welcome): 1. There seems to be a "sleep" capability in the DNBProcessAttachWait method [1]. I'm not exactly sure how this "sleep" function works. When I use it the sleep seems to be a no-op. Is there

Re: [lldb-dev] LLDB Process Attach Failed When Waiting

2018-06-06 Thread Ryan Lovelett via lldb-dev
gt; That said, it looks like the format is just that we send the process > name hex-encoded. For that you can simply use > StringExtractor.GetHexBytes. There should be plenty of examples doing > hex {en|de}coding around the codebase. > On Wed, 6 Jun 2018 at 03:51, Ryan Lovelett via lld

Re: [lldb-dev] LLDB Process Attach Failed When Waiting

2018-06-06 Thread Ryan Lovelett via lldb-dev
examples doing > hex {en|de}coding around the codebase. > On Wed, 6 Jun 2018 at 03:51, Ryan Lovelett via lldb-dev > wrote: > > > > Thank you that was a huge help. I'm making some progress now. > > > > Though I wonder, is there any documentation of the GDB packet

Re: [lldb-dev] LLDB Process Attach Failed When Waiting

2018-06-05 Thread Ryan Lovelett via lldb-dev
packet, but doesn't work on Linux because lldb- > rpc-server doesn't know currently respond to the vAttachWait packet. So > all you should need to do is teach lldb-server to handle the vAttachWait > packet. > > Jim > > > > On Jun 5, 2018, at 5:44 PM, Ryan L

Re: [lldb-dev] LLDB Process Attach Failed When Waiting

2018-06-05 Thread Ryan Lovelett via lldb-dev
AM, Ryan Lovelett >>>>>> wrote:>>>>>> >>>>>>> It might be a lldb-server issue? >>>>>> >>>>>> How would one go about determining this? >>>>>> >>>>>> (lldb) log enab

Re: [lldb-dev] LLDB Process Attach Failed When Waiting

2018-06-04 Thread Ryan Lovelett via lldb-dev
t;>>> On May 31, 2018, at 11:04 AM, Ryan Lovelett >>>>>> wrote:>>>>>> >>>>>>> It might be a lldb-server issue? >>>>>> >>>>>> How would one go about determining this? >>>>>> >&

Re: [lldb-dev] LLDB Process Attach Failed When Waiting

2018-06-04 Thread Ryan Lovelett via lldb-dev
ot; --waitfor >>>> error: attach failed: lost connection >>>> >>>> Attached the log output. Maybe it'll make more sense to you >>>> than me.>>>> >>>> That escalated quickly. So I've read through that log. I

Re: [lldb-dev] LLDB Process Attach Failed When Waiting

2018-05-31 Thread Ryan Lovelett via lldb-dev
ed#38 with the following >> response being $#00. Perhaps I'm reading too much but is it that it's >> reporting that it is not supported?>> >> Does lldb-server need to be compiled in a certain way to add support >> for attach wait?>> >> On Thu

Re: [lldb-dev] LLDB Process Attach Failed When Waiting

2018-05-31 Thread Ryan Lovelett via lldb-dev
d in a certain way to add support for attach wait? On Thu, May 31, 2018, at 1:49 PM, Greg Clayton wrote: > Try enabling logging with: > > (lldb) log enable -f /tmp/packets.txt gdb-remote packets > > And the try the attach. It might be a lldb-server issue? > > > On May 31,

[lldb-dev] LLDB Process Attach Failed When Waiting

2018-05-31 Thread Ryan Lovelett via lldb-dev
I am attempting to use: process attach --name "" --waitfor The problem is that it immediately returns error: attach failed: lost connection. Is this something I can troubleshoot further? Or is this not supported on Linux? -- Ryan Lovelett ___ lldb-