This is a side effect of my work on lldb plugin unit tests, in which I tried to fix the somewhat unreliable test results.
- Move unit test debugees to common folder, make gdb uses common unit test helpers
- Make gdb plugin unit tests more reliable. waitForState now guarantees the session state after returning is exactly the requested one (otherwise fails the test).
The main problem is that DebugSession could end and get deleted when running event loop (i.e. in QTest::qWait).
And this fix adds proper checks to it. This by itself doesn't fix any tests, but it helps when some tests
did goes wrong. Without this fix, they could crash the whole test process due to accessing to deleted object.