Re: [lldb-dev] Failing LIT-based lldb-mi tests

2018-08-10 Thread Александр Поляков via lldb-dev
AFAIK, there is no mechanism in lldb-mi to distinguish a command that expects a frame, so we need to modify each command manually. Am I right? If so, I found the Process::WaitForProcessToStop method which we can add to SB API and use in lldb-mi. сб, 11 авг. 2018 г. в 0:50, Adrian Prantl : >

Re: [lldb-dev] Failing LIT-based lldb-mi tests

2018-08-10 Thread Александр Поляков via lldb-dev
One important question: what do you mean talking about "block"? Does it mean that SBTarget::Launch blocks the process and the user can't continue working with this process until it stops? сб, 11 авг. 2018 г. в 2:41, Adrian Prantl : > I was wondering how this worked in the regular SBAPI that we

Re: [lldb-dev] Failing LIT-based lldb-mi tests

2018-08-11 Thread Александр Поляков via lldb-dev
I reproduced the test you suggested and got following output: build/bin/lldb-mi --synchronous a.out < llvm/tools/lldb/lit/tools/lldb-mi/exec/lldb-mi-fail.test (gdb) -file-exec-and-symbols "a.out" ^done (gdb) ^done (gdb)

Re: [lldb-dev] Failing LIT-based lldb-mi tests

2018-08-13 Thread Александр Поляков via lldb-dev
Sure, this is the log with the typed commands: build/bin/lldb-mi a.out (gdb) -file-exec-and-symbols "a.out" ^done (gdb)

Re: [lldb-dev] [GSoC] Re-implement lldb-mi on top of the LLDB public API

2018-08-13 Thread Александр Поляков via lldb-dev
; polyakov@gmail.com> wrote: > >> Thank you, Leonard, >> I'm going to keep contributing to LLVM, so I think this is not the end! >> >> On Mon, Aug 13, 2018 at 8:15 PM Leonard Mosescu >> wrote: >> >>> Nice to see great progress in this ar

Re: [lldb-dev] Failing LIT-based lldb-mi tests

2018-08-15 Thread Александр Поляков via lldb-dev
I built an lldb myself. As far as I remember, this error has been seen in swift's CI on machines running Linux. Adrian, could you correct me if I'm wrong? On Wed, Aug 15, 2018 at 8:02 PM wrote: > That definitely points to an issue with either your install or your system. > > > > Is that an lldb

Re: [lldb-dev] Failing LIT-based lldb-mi tests

2018-08-13 Thread Александр Поляков via lldb-dev
Yes, I do, I'm able to pass any command to lldb-mi before the breakpoint is hit. I guess that making exec-run to block the control until the process stops might be the solution we are looking for. On Mon, Aug 13, 2018 at 11:18 PM Adrian Prantl wrote: > > > On Aug 13, 2018, at 11:54 AM,

Re: [lldb-dev] Failing LIT-based lldb-mi tests

2018-08-14 Thread Александр Поляков via lldb-dev
It seems that the real problem is that sometimes lldb-mi can't launch a process: build/bin/lldb-mi --synchronous a.out < llvm/tools/lldb/lit/tools/lldb-mi/exec/exec-step-instruction.test (gdb) -file-exec-and-symbols "a.out" ^done (gdb) ^done (gdb)

Re: [lldb-dev] Failing LIT-based lldb-mi tests

2018-08-14 Thread Александр Поляков via lldb-dev
After long-long debugging I found out that lldb-mi can't successfully launch a process since sometimes it isn't connected with something(I don't know what is it). I found out that it fails after `if (IsConnected())` from `GDBRemoteCommunication::SendPacketNoLock(llvm::StringRef payload)`. Do you

Re: [lldb-dev] Failing LIT-based lldb-mi tests

2018-08-14 Thread Александр Поляков via lldb-dev
Here is what I got from gdb-remote packet log: (gdb) lldb-mi < 1> send packet: + lldb-mi history[1] tid=0x784a < 1> send packet: + lldb-mi < 19> send packet: $QStartNoAckMode#b0 lldb-mi < 1> read packet: + lldb-mi < 6> read packet: $OK#9a

Re: [lldb-dev] Failing LIT-based lldb-mi tests

2018-08-14 Thread Александр Поляков via lldb-dev
Yes, it is. Here is the gdb-remote process log: (gdb) -file-exec-and-symbols "a.out" ^done (gdb) ^done (gdb)

Re: [lldb-dev] Failing LIT-based lldb-mi tests

2018-08-14 Thread Александр Поляков via lldb-dev
LLDB fails with the same symptoms: lldb < 1> send packet: + lldb history[1] tid=0x0c09 < 1> send packet: + lldb < 19> send packet: $QStartNoAckMode#b0 lldb < 1> read packet: + lldb < 6> read packet: $OK#9a lldb <

Re: [lldb-dev] Failing LIT-based lldb-mi tests

2018-08-14 Thread Александр Поляков via lldb-dev
I'm running Ubuntu 16.04. The lldb-mi behaves in such a way randomly, the only thing that in my opinion can lead to this error is high busyness of the machine that runs debug session, but I'm not sure. On Wed, Aug 15, 2018 at 12:59 AM wrote: > That looks normal, up until the A packet failure.

[lldb-dev] [GSoC] Re-implement lldb-mi on top of the LLDB public API

2018-08-12 Thread Александр Поляков via lldb-dev
Hi LLVM folks, During this summer I was working on re-implementing of lldb-mi to correctly use LLDB public API. You are welcome to read my final report where I describe the contribution and challenges I faced with. Link to final report: https://apolyakov.github.io/GSoC-2018/ -- Alexander

Re: [lldb-dev] Failing LIT-based lldb-mi tests

2018-08-20 Thread Александр Поляков via lldb-dev
Added Pavel to this thread. Hi Pavel, Do you know is it possible to enable lldb-server's logs in lldb or lldb-mi? On Wed, Aug 15, 2018 at 8:34 PM Adrian Prantl wrote: > > > On Aug 15, 2018, at 10:31 AM, Александр Поляков > wrote: > > I built an lldb myself. As far as I remember, this error

Re: [lldb-dev] MI Handle events.

2018-07-19 Thread Александр Поляков via lldb-dev
I've tried to put an assert into HandleProcessEventStateSuspended, but there wasn't a testcase triggering it. So, my question is still actual, any help will be really appreciate. пн, 16 июл. 2018 г. в 13:56, Pavel Labath : > The eStateSuspended state is used for threads (you can set it via >

[lldb-dev] MI Handle events.

2018-07-13 Thread Александр Поляков via lldb-dev
Hi lldb-dev, I'm looking at re-implementing of CMICmnLLDBDebugHandleEvents::HandleProcessEventStateSuspended to get rid of HandleCommand("process status") hack and use SB API instead. To check my changes I need to get HandleProcessEventStateSuspended called, so could someone help me with a

Re: [lldb-dev] Welcome Alexander!

2018-04-24 Thread Александр Поляков via lldb-dev
​Thanks Greg, I changed the title and abstract, please check it out. https://summerofcode.withgoogle.com/projects/#5427847301169152​ Regards, Alexander Polyakov 2018-04-24 19:44 GMT+03:00 Greg Clayton : > > > On Apr 24, 2018, at 9:37 AM, Jim Ingham

Re: [lldb-dev] Welcome Alexander!

2018-04-24 Thread Александр Поляков via lldb-dev
I don't completely understand how it possible to add breakpoint before choosing a file(did you mean -file-exec-and-symbols cmd?). And another important thing: could you explain me what is target in terms of lldb? Thanks in advance. Regards, Alexander Polyakov 2018-04-25 1:32 GMT+03:00 Ted

Re: [lldb-dev] Welcome Alexander!

2018-04-24 Thread Александр Поляков via lldb-dev
Thanks Jim, it helped me a lot. Can we do something like this: 1) having empty dummy target; 2) setting breakpoints to this dummy target until getting real file through -file-exec-and-symbols; 3) creating new target and moving all breakpoints from dummy target to it; 4) clearing all