[lldb-dev] LLDB Process Attach Failed When Waiting

Ryan Lovelett via lldb-dev lldb-dev at lists.llvm.org
Thu Jun 7 06:10:33 PDT 2018

> sleep_for is definitely better than usleep because of portability (and
> we use it elsewhere already).

Okay that is what I went with.
> Could you attach the patch to phabricator instead
> <https://reviews.llvm.org/differential/> ? It's easier to make
> comments and iterate there. When you upload the patch be sure to
> include full context in it (git diff -U9999 or similar). Or you can
> use the arcanist tool which will do it for you.

I _think_ I have done this correctly.


$ svn co http://llvm.org/svn/llvm-project/lldb/trunk lldb-trunk
$ patch 0001-First-working-attempt.patch # this is what I mailed last night
$ arc diff

I was not quite sure what I should write for a title or summary. Based on other differentials on the site, the title usually seems to have something in brackets but it is not clear to me what that should be in my case.

> As for the test, there are two test ways you can do that. One is using
> the python tests
> (test/testcases/tools/lldb-server/TestGdbRemoteAttach.py would be a
> good starting point), other is via googletest
> (unittests/tools/lldb-server/LLGSTest.cpp). Neither of the tests is
> going to be particularly nice because you will have to juggle multiple
> things (speaking with the server and launching the inferior), but it
> should be doable using both.

I will see what I can glean from those examples. See if I can turn them into something.

> We should already be able to display a better error message, if the
> server sends one (the Status overload of the SendErrorResponse
> function). If the error string that comes out of that is not good
> enough, then we can tweak whoever creates the Status object to fill it
> out better as a separate patch.

I will look into this and see what is currently happening.

More information about the lldb-dev mailing list