[lldb-dev] MI Handle events.

Adrian Prantl via lldb-dev lldb-dev at lists.llvm.org
Mon Jul 23 01:38:34 PDT 2018


Have you tried my other suggestion; doing an actual debug session with an lldb-mi client (emacs/vim/vs code/eclipse)? Of that doesn't work,  I'm afraid you may have to do some detective work here to figure out how to add test coverage for this code path. I ssume that you already tried to create a synthetic test that suspends a process and then queries the status through the MI interface?

-- adrian

> On Jul 19, 2018, at 10:14 PM, Александр Поляков <polyakov.alx at gmail.com> wrote:
> 
> 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 <labath at google.com <mailto:labath at google.com>>:
> The eStateSuspended state is used for threads (you can set it via
> SBThread::Suspend/Resume). It controls whether a "continue" operation
> on the process will run the thread or not.
> 
> I am not sure if you can ever see that state on the process itself.
> 
> 
> On Sat, 14 Jul 2018 at 15:39, Adrian Prantl via lldb-dev
> <lldb-dev at lists.llvm.org <mailto:lldb-dev at lists.llvm.org>> wrote:
> >
> >
> >
> > > On Jul 13, 2018, at 10:59 PM, Александр Поляков <polyakov.alx at gmail.com <mailto:polyakov.alx at gmail.com>> wrote:
> > >
> > > 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 sequence of lldb-mi commands which will call HandleProcessEventStateSuspended.
> >
> > Other than reading through the code and manually tracing a sequence where this function gets called, one simple trick you can try is to put an assert(false) into HandleProcessEventStateSuspended, run the testsuite (or perform an lldb-mi debug session) and look for a testacase that triggers the new assertion.
> >
> > -- adrian
> >
> > >
> > > Thanks in advance.
> > >
> > > --
> > > Alexander
> >
> > _______________________________________________
> > lldb-dev mailing list
> > lldb-dev at lists.llvm.org <mailto:lldb-dev at lists.llvm.org>
> > http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev <http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev>
> 
> 
> -- 
> Alexander

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20180723/2a0ebcd7/attachment.html>


More information about the lldb-dev mailing list