When we try to find the executable module for our target we don't check
if we already have an executable module set. This causes that when debugging
a program that dlopens another executable, LLDB will take that other executable
as the new executable of the target (which causes that future launches of the
target will launch the dlopen'd executable instead of the original executable).
This just adds a check that we only set the executable when we haven't already
found one.
Fixes rdar://63443099
One little nit, breakpoint.IsValid doesn't actually check very much. You would have to miss-call a breakpoint API for it to return an invalid breakpoint. After all, breakpoints are search kernels, and IsValid just tells you whether you made a valid search kernel. What you really want to check here is whether your breakpoint got any locations. I think this mistake is made a bunch of times in the testsuite...
It's not terribly vital because if you didn't "continue_to_breakpoint" is going to return no stopped threads.