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] Failing LIT-based lldb-mi tests

2018-08-15 Thread Adrian Prantl via lldb-dev
> On Aug 15, 2018, at 10:31 AM, Александр Поляков > wrote: > > 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? > Yes, we have seen these test fail regularly, but I don't have any

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

2018-08-15 Thread Александр Поляков via lldb-dev
*To:* Ted Woodward > *Cc:* Adrian Prantl ; LLDB > *Subject:* Re: [lldb-dev] Failing LIT-based lldb-mi tests > > > > LLDB fails with the same symptoms: > > lldb < 1> send packet: + > > lldb history[1] tid=0x0c09 < 1> send packet:

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

2018-08-15 Thread via lldb-dev
: Tuesday, August 14, 2018 6:15 PM To: Ted Woodward Cc: Adrian Prantl ; LLDB Subject: Re: [lldb-dev] Failing LIT-based lldb-mi tests LLDB fails with the same symptoms: lldb < 1> send packet: + lldb history[1] tid=0x0c09 < 1> send packet: + lldb

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

2018-08-14 Thread Александр Поляков via lldb-dev
6> read packet: $OK#9a > > lldb-mi < 72> send packet: > $A62,0,2f757372322f746564776f6f642f6c6c6462 > > 5f746573742f666163746c696e#19 > > lldb-mi < 6> read packet: $OK#9a > > lldb-mi < 18> send packet: $qLaunchSuccess#a5 > > l

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

2018-08-14 Thread via lldb-dev
6> read packet: $OK#9a lldb-mi < 16> send packet: $qProcessInfo#dc lldb-mi < 172> read packet: $pid:378a;parent-pid:3785;real-uid:34004;real-gid:c8;effective-uid:34004;effective-gid:c8;triple:7838365f36342d2d6c696e7578 the rest of the log is full of qRegisterInfo and other pac

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

2018-08-14 Thread Александр Поляков via lldb-dev
ure. I’m building ToT lldb-mi > right now on Ubuntu 14.04. What OS are you running on? > > > > *From:* Александр Поляков > *Sent:* Tuesday, August 14, 2018 4:56 PM > *To:* Adrian Prantl > *Cc:* Ted Woodward ; LLDB < > lldb-dev@lists.llvm.org> > *Subject:* Re: [ll

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

2018-08-14 Thread via lldb-dev
That looks normal, up until the A packet failure. I’m building ToT lldb-mi right now on Ubuntu 14.04. What OS are you running on? From: Александр Поляков Sent: Tuesday, August 14, 2018 4:56 PM To: Adrian Prantl Cc: Ted Woodward ; LLDB Subject: Re: [lldb-dev] Failing LIT-based lldb-mi

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 Adrian Prantl via lldb-dev
> On Aug 14, 2018, at 2:43 PM, Александр Поляков wrote: > > 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

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

2018-08-14 Thread Александр Поляков via lldb-dev
Take a look at the gdb-remote packet log. Inject this command: > > log enable gdb-remote packets > > > > if the log has very little in it, try the process log: > > log enable gdb-remote process > > > > > > *From:* lldb-dev *On Behalf Of *? > ???

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

2018-08-14 Thread via lldb-dev
: Tuesday, August 14, 2018 4:14 PM To: Adrian Prantl Cc: LLDB Subject: Re: [lldb-dev] Failing LIT-based lldb-mi tests 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

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

2018-08-14 Thread Adrian Prantl via lldb-dev
> On Aug 14, 2018, at 2:13 PM, Александр Поляков wrote: > > 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 >

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 Adrian Prantl via lldb-dev
> On Aug 14, 2018, at 12:11 PM, Александр Поляков > wrote: > > 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) >

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-13 Thread Adrian Prantl via lldb-dev
> On Aug 13, 2018, at 4:19 PM, Александр Поляков wrote: > > 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. Right. I believe that it

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-13 Thread Adrian Prantl via lldb-dev
> On Aug 13, 2018, at 11:54 AM, Александр Поляков > wrote: > > 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) >

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] Failing LIT-based lldb-mi tests

2018-08-13 Thread Adrian Prantl via lldb-dev
> On Aug 11, 2018, at 3:58 AM, Александр Поляков wrote: > > 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 >

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-10 Thread Adrian Prantl via lldb-dev
That't interesting. Where you able to simulate the error seen on the bots by inserting a sleep() unto the debugged program? -- adrian > On Aug 10, 2018, at 5:06 PM, Александр Поляков wrote: > > It seems that lldb-mi in such a situation just hangs: > > build/bin/lldb-mi --synchronous bash >

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

2018-08-10 Thread Adrian Prantl via lldb-dev
> On Aug 10, 2018, at 4:50 PM, Александр Поляков wrote: > > 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? Pretty much. The same way as the

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-10 Thread Adrian Prantl via lldb-dev
I was wondering how this worked in the regular SBAPI that we use for all the "normal" python-based LLDB tests. The implementation of SBProcess::Continue() for example calls Process::Resume() or Process::ResumeSynchronous() depending on whether synchronous mode is set or not. It's not

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 Adrian Prantl via lldb-dev
[adding lldb-dev back to the conversation] > On Aug 10, 2018, at 2:37 PM, Adrian Prantl wrote: > > > >> On Aug 10, 2018, at 2:25 PM, Александр Поляков >> wrote: >> >> I didn't check this yet. lldb-mi already runs LIT test in the --synchronous >> mode and the tests keep failing. >> > >

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

2018-08-10 Thread Adrian Prantl via lldb-dev
> On Aug 10, 2018, at 11:13 AM, Adrian Prantl via lldb-dev > wrote: > > [+lldb-dev, since this affects all bots equally] > > Alexander, it looks like there is a race condition in some of the LIT-based > lldb-mi tests. > > For example, exec-next.test: > > # Test lldb-mi -exec-next

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

2018-08-10 Thread Adrian Prantl via lldb-dev
[+lldb-dev, since this affects all bots equally] Alexander, it looks like there is a race condition in some of the LIT-based lldb-mi tests. For example, exec-next.test: # Test lldb-mi -exec-next command. # Check that we have a valid target created via '%lldbmi %t'. # CHECK: ^done