[lldb-dev] [Bug 37640] New: LLDB crash when stepping into delegate method

2018-05-31 Thread via lldb-dev
https://bugs.llvm.org/show_bug.cgi?id=37640

Bug ID: 37640
   Summary: LLDB crash when stepping into delegate method
   Product: lldb
   Version: unspecified
  Hardware: Macintosh
OS: MacOS X
Status: NEW
  Severity: normal
  Priority: P
 Component: All Bugs
  Assignee: lldb-dev@lists.llvm.org
  Reporter: craig.ro...@gmail.com
CC: llvm-b...@lists.llvm.org

Created attachment 20366
  --> https://bugs.llvm.org/attachment.cgi?id=20366&action=edit
Sample Project With Crash Log

In my app, I have an implementation of a Multicast delegate. When stepping into
the "invoke" method of the MulticastDelegate class (see attached code), at line
73, the LLDB debugger crashes. I haven't been able to figure out why. The app
remains running and is unaffected; it's just the debugger that crashes. 

Here's the message I received in the LLDB console in Xcode:

Message from debugger: The LLDB RPC server has crashed. The crash log is
located in ~/Library/Logs/DiagnosticReports and has a prefix 'lldb-rpc-server'.
Please file a bug and attach the most recent crash log.

Full crash log attached, along with a sample app demonstrating the crash. You
must interactively debug and step into the method in order to trigger the
crash. If you simply step over, the debugger is fine. It just takes exception
to something in that particular method.

-- 
You are receiving this mail because:
You are the assignee for the bug.___
lldb-dev mailing list
lldb-dev@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev


[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-dev mailing list
lldb-dev@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev


[lldb-dev] [Bug 37640] LLDB crash when stepping into delegate method

2018-05-31 Thread via lldb-dev
https://bugs.llvm.org/show_bug.cgi?id=37640

Craig Rouse  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |INVALID

--- Comment #3 from Craig Rouse  ---
Now reported with Apple, as suggested by Jim.

-- 
You are receiving this mail because:
You are the assignee for the bug.___
lldb-dev mailing list
lldb-dev@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev


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

2018-05-31 Thread Greg Clayton via lldb-dev
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, 2018, at 9:02 AM, Ryan Lovelett via lldb-dev 
>  wrote:
> 
> 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-dev mailing list
> lldb-dev@lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev

___
lldb-dev mailing list
lldb-dev@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev


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

2018-05-31 Thread Ryan Lovelett via lldb-dev
> It might be a lldb-server issue?

How would one go about determining this?

(lldb) log enable -f /tmp/packates.txt gdb-remote packets
(lldb) process attach --name "" --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 found something that 
says $qVAttachOrWaitSupported#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, 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, 2018, at 9:02 AM, Ryan Lovelett via lldb-dev 
> >  wrote:
> > 
> > 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-dev mailing list
> > lldb-dev@lists.llvm.org
> > http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev
> 
lldb <   1> send packet: +
lldb history[1] tid=0x29c5 <   1> send packet: +
lldb <  19> send packet: $QStartNoAckMode#b0
lldb <   1> read packet: +
lldb <   6> read packet: $OK#9a
lldb <   1> send packet: +
lldb <  41> send packet: $qSupported:xmlRegisters=i386,arm,mips#12
lldb < 124> read packet: 
$PacketSize=2;QStartNoAckMode+;QThreadSuffixSupported+;QListThreadsInStopReply+;qEcho+;QPassSignals+;qXfer:auxv:read+#be
lldb <  26> send packet: $QThreadSuffixSupported#e4
lldb <   6> read packet: $OK#9a
lldb <  27> send packet: $QListThreadsInStopReply#21
lldb <   6> read packet: $OK#9a
lldb <  13> send packet: $qHostInfo#9b
lldb < 337> read packet: 
$triple:7838365f36342d2d6c696e75782d676e75;ptrsize:8;distribution_id:7562756e7475;watchpoint_exceptions_received:after;endian:little;os_version:4.15.0;os_build:342e31352e302d32322d67656e65726963;os_kernel:2332342d5562756e747520534d5020576564204d61792031362031323a31353a3137205554432032303138;hostname:7562756e74752d73776966742d646576;#46
lldb <  10> send packet: $vCont?#49
lldb <  17> read packet: $vCont;c;C;s;S#62
lldb <  27> send packet: $qVAttachOrWaitSupported#38
lldb <   4> read packet: $#00
lldb <  23> send packet: $QEnableErrorStrings#8c
lldb <   6> read packet: $OK#9a
lldb <  23> send packet: $QSetDetachOnError:1#f8
lldb <   6> read packet: $OK#9a
lldb <  48> send packet: 
$vAttachWait;6c616e677365727665722d7377696674#d6
lldb <   4> read packet: $#00
___
lldb-dev mailing list
lldb-dev@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev


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

2018-05-31 Thread Greg Clayton via lldb-dev
lldb-server claims it doesn't support it:

lldb <  48> send packet: 
$vAttachWait;6c616e677365727665722d7377696674#d6
lldb <   4> read packet: $#00


Returning the empty packet ("$#00") means it is not supported, but we really 
should give a better error message than this. 

It isn't that hard to implement. It would be easy to copy the code that is in 
debugserver in DNB.cpp in the DNBProcessAttachWait function. Most of it is 
probably posix style stuff. 

So two issues here:
1 - we need a better error message when vAttachWait returns unsupported
2 - fix lldb-server to support vAttachWait

Greg


> 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?
> 
> (lldb) log enable -f /tmp/packates.txt gdb-remote packets
> (lldb) process attach --name "" --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 found something that 
> says $qVAttachOrWaitSupported#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, 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, 2018, at 9:02 AM, Ryan Lovelett via lldb-dev 
>>>  wrote:
>>> 
>>> 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-dev mailing list
>>> lldb-dev@lists.llvm.org
>>> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev
>> 
> 

___
lldb-dev mailing list
lldb-dev@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev


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

2018-05-31 Thread Ryan Lovelett via lldb-dev
Well at least there is a little good news. I understood way more of
those logs than I thought I did.
> So two issues here:
> 1 - we need a better error message when vAttachWait returns
> unsupported> 2 - fix lldb-server to support vAttachWait

A few questions.

What is the protocol here? Can/should I report the issues at
https://bugs.llvm.org/ ? Or is that something that a project member
needs to do? Assuming that I can, would this be two seperate issues or
one "large" issue?
Barring that this is not something someone else might implement
better/faster than me. Considering I have zero LLDB development
experience is this something that I could tackle?
On Thu, May 31, 2018, at 3:02 PM, Greg Clayton wrote:
> lldb-server claims it doesn't support it:
> 
> lldb <  48> send packet:
> $vAttachWait;6c616e677365727665722d7377696674#d6> lldb <   4> 
> read packet: $#00
> 
> 
> Returning the empty packet ("$#00") means it is not supported, but we
> really should give a better error message than this.> 
> It isn't that hard to implement. It would be easy to copy the code
> that is in debugserver in DNB.cpp in the DNBProcessAttachWait
> function. Most of it is probably posix style stuff.> 
> So two issues here:
> 1 - we need a better error message when vAttachWait returns
> unsupported> 2 - fix lldb-server to support vAttachWait
> 
> Greg
> 
> 
>> 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?
>> 
>> (lldb) log enable -f /tmp/packates.txt gdb-remote packets
>> (lldb) process attach --name "" --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 found
>> something that says $qVAttachOrWaitSupported#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, 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, 2018, at 9:02 AM, Ryan Lovelett via lldb-dev >>> d...@lists.llvm.org> wrote: 
 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-dev mailing list
 lldb-dev@lists.llvm.org
 http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev
>> 

___
lldb-dev mailing list
lldb-dev@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev


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

2018-05-31 Thread Davide Italiano via lldb-dev
On Thu, May 31, 2018 at 12:40 PM, Ryan Lovelett via lldb-dev
 wrote:
> Well at least there is a little good news. I understood way more of those
> logs than I thought I did.
>
> So two issues here:
> 1 - we need a better error message when vAttachWait returns unsupported
> 2 - fix lldb-server to support vAttachWait
>
>
> A few questions.
>
> What is the protocol here? Can/should I report the issues at
> https://bugs.llvm.org/ ? Or is that something that a project member needs to
> do? Assuming that I can, would this be two seperate issues or one "large"
> issue?
>

You can open a bug on bugzilla (you can ask an account via e-mail).

> Barring that this is not something someone else might implement
> better/faster than me. Considering I have zero LLDB development experience
> is this something that I could tackle?
>

You can try and see how far you get (and ask questions, either here or
on IRC oftc.net/#lldb)

--
Davide
___
lldb-dev mailing list
lldb-dev@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev


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

2018-05-31 Thread Greg Clayton via lldb-dev


> On May 31, 2018, at 12:40 PM, Ryan Lovelett  wrote:
> 
> Well at least there is a little good news. I understood way more of those 
> logs than I thought I did.
> 
>> So two issues here:
>> 1 - we need a better error message when vAttachWait returns unsupported
>> 2 - fix lldb-server to support vAttachWait
> 
> A few questions.
> 
> What is the protocol here? Can/should I report the issues at 
> https://bugs.llvm.org/  ? Or is that something that a 
> project member needs to do? Assuming that I can, would this be two seperate 
> issues or one "large" issue?
> 
> Barring that this is not something someone else might implement better/faster 
> than me. Considering I have zero LLDB development experience is this 
> something that I could tackle?

I didn't realize this functionality was missing in lldb-server. I can take a 
stab at implementing it and see what I can do. Stay tuned.

> 
> On Thu, May 31, 2018, at 3:02 PM, Greg Clayton wrote:
>> lldb-server claims it doesn't support it:
>> 
>> lldb <  48> send packet: 
>> $vAttachWait;6c616e677365727665722d7377696674#d6
>> lldb <   4> read packet: $#00
>> 
>> 
>> Returning the empty packet ("$#00") means it is not supported, but we really 
>> should give a better error message than this. 
>> 
>> It isn't that hard to implement. It would be easy to copy the code that is 
>> in debugserver in DNB.cpp in the DNBProcessAttachWait function. Most of it 
>> is probably posix style stuff. 
>> 
>> So two issues here:
>> 1 - we need a better error message when vAttachWait returns unsupported
>> 2 - fix lldb-server to support vAttachWait
>> 
>> Greg
>> 
>> 
>>> 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?
>>> 
>>> (lldb) log enable -f /tmp/packates.txt gdb-remote packets
>>> (lldb) process attach --name "" --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 found something 
>>> that says $qVAttachOrWaitSupported#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, 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, 2018, at 9:02 AM, Ryan Lovelett via lldb-dev 
> mailto:lldb-dev@lists.llvm.org>> wrote:
> 
> 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-dev mailing list
> lldb-dev@lists.llvm.org 
> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev
>>> 

___
lldb-dev mailing list
lldb-dev@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev