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 wrote: > > > On Apr 24, 2018, at 7:43 AM, Gr

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 Woodwa

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 br

[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 sequenc

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 > SBTh

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 : > [addi

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 us

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

2018-08-10 Thread Александр Поляков via lldb-dev
It seems that lldb-mi in such a situation just hangs: build/bin/lldb-mi --synchronous bash (gdb) -file-exec-and-symbols "bash" ^done (gdb) =library-loaded,id="/bin/bash",target-name="/bin/bash",host-name="/bin/bash",symbols-loaded="0",loaded_addr="-",size="0" -exec-run ^C^C exit It doesn't react

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) =library-loaded,id="/home/alexander/workspace/gsoc/a.out",target-name="/home/a

[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] [GSoC] Re-implement lldb-mi on top of the LLDB public API

2018-08-13 Thread Александр Поляков via lldb-dev
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 area! > > On Sun, Aug 12, 2018 at 2:49 PM, Александр Поляков via lldb-dev < > lldb-dev@l

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) =library-loaded,id="/home/alexander/workspace/gsoc/a.out",target-name="/home/alexander/workspace/gsoc/a.out",host-name="/home/alexander/workspace/gsoc/a.out",symbols-loaded="0",l

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

2018-08-13 Thread Александр Поляков via lldb-dev
Oops, I made a mistake, I typed break-insert main. Here is the right output: build/bin/lldb-mi a.out (gdb) -file-exec-and-symbols "a.out" ^done (gdb) =library-loaded,id="/home/alexander/workspace/gsoc/a.out",target-name="/home/alexander/workspace/gsoc/a.out",host-name="/home/alexander/workspace/gs

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

2018-08-13 Thread Александр Поляков via lldb-dev
AM, Александр Поляков < > 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: >> >>> Ni

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) =library-loaded,id="/home/alexander/workspace/gsoc

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 h

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 lldb-

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) =library-loaded,id="/home/alexander/workspace/gsoc/a.out",target-name="/home/alexander/workspace/gsoc/a.out",host-name="/home/alexander/workspace/gsoc/a.out",symbols-loaded="0",loaded_addr=

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. I’

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 < 1>

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-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 ha