There is a problem when launching a process on linux where a bunch of spurious output (unwanted stop message and assembly language) is dumped to the tty. This is because of the initial stop that happens when the process is attached to. The linux launch function manually runs the stop event through HandlePrivateEvent() which broadcasts that stop as a public stop... triggering a stop message and the corresponding instructions where it stopped. During this cycle it also does an extra Push/Pop of an IO handler. My solution is 2 parts:
- When launching: on the initial stop, directly call SetPublicState() to set state to Stopped, instead letting it be done via broadcasting a public stop message
- Since there will no longer be public stop to pop an IO handler, we need to stop one from being pushed during the initial launch
There is a longer discussion of this on the [lldb-dev] list