<div dir="ltr">In what instances do you think it wouldn't work? At least on Windows it's trivial. Jim provided some code that would work on OSX, and someone else provided a method earlier in the thread that should work for Linux. What are the specific reliability concerns you have?<div><br></div><div>Changing lldb to prever debug via launch instead of attach wouldn't necessarily fix the problem, because you still need to write tests that test attach sometimes.</div></div><br><div class="gmail_quote"><div dir="ltr">On Thu, Aug 27, 2015 at 3:01 PM <<a href="mailto:dawn@burble.org">dawn@burble.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Thu, Aug 27, 2015 at 05:05:23PM +0000, Zachary Turner via lldb-dev wrote:<br>
> Well I'm xfailing it for now, but this other method seems kind of hackish<br>
> to me because it means the inferior and the debugger have to coordinate<br>
> with each other, which means the test has to know about the executable and<br>
> the executable has to know about the test. I'd rather remove one direction<br>
> of this coupling.<br>
><br>
> Eventually my plan is to introduce a test_util.a which all of the test<br>
> executables link against. We can provide a platform-independent<br>
> wait_for_debugger_to_attach() method here that just does the right thing on<br>
> all platforms. This way the tests can be written without having to do this<br>
> funny business :)<br>
<br>
What about fixing lldb to prefer to debug via launch instead of attach depending on the platform???<br>
<br>
I don't see how you could write a wait_for_debugger_to_attach() that would work reliably.<br>
</blockquote></div>