[lldb-dev] How does attach work on non-Windows?
Zachary Turner via lldb-dev
lldb-dev at lists.llvm.org
Thu Aug 27 15:17:24 PDT 2015
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?
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.
On Thu, Aug 27, 2015 at 3:01 PM <dawn at burble.org> wrote:
> On Thu, Aug 27, 2015 at 05:05:23PM +0000, Zachary Turner via lldb-dev
> wrote:
> > Well I'm xfailing it for now, but this other method seems kind of hackish
> > to me because it means the inferior and the debugger have to coordinate
> > with each other, which means the test has to know about the executable
> and
> > the executable has to know about the test. I'd rather remove one
> direction
> > of this coupling.
> >
> > Eventually my plan is to introduce a test_util.a which all of the test
> > executables link against. We can provide a platform-independent
> > wait_for_debugger_to_attach() method here that just does the right thing
> on
> > all platforms. This way the tests can be written without having to do
> this
> > funny business :)
>
> What about fixing lldb to prefer to debug via launch instead of attach
> depending on the platform???
>
> I don't see how you could write a wait_for_debugger_to_attach() that would
> work reliably.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20150827/e5099bdc/attachment.html>
More information about the lldb-dev
mailing list