Make kdev{debuggercommon, gdb, lldb} compile under Windows.
ClosedPublic

Authored by arrowd on Oct 26 2017, 8:23 PM.

Details

Summary

This patch basically stubs out all stuff that doesn't compile right away.
Most stuff is located in stty.cpp.

From what I've found, Windows does not have a mention of "tty", so STTY::OutOutput/STTY::ErrOutput can't possible fire. This, in turn, makes MIDebugSession::inferiorTtyStdout/MIDebugSession::inferiorTtyStderr not fire.
In the end, KDevelop doesn't get any output from the debuggee.

If I understand it right, we need a way to fire MIDebugSession::inferiorTtyStdout when getting
output right in MI's console, but I haven't looked at it yet.

Diff Detail

Repository
R32 KDevelop
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
arrowd created this revision.Oct 26 2017, 8:23 PM
Restricted Application added a subscriber: kdevelop-devel. · View Herald TranscriptOct 26 2017, 8:23 PM
arrowd updated this revision to Diff 21402.Oct 26 2017, 9:22 PM

Also fix compilation of debuggees for unit tests.

kfunk accepted this revision.Oct 27 2017, 6:57 AM
kfunk added a subscriber: kfunk.

Rest LGTM, very nice Gleb! You rock :)

plugins/debuggercommon/midebugger.cpp
115

NULL -> nullptr, TRUE -> true, etc.

plugins/debuggercommon/tests/debuggees/debugeethreads.cpp
28

Not sure if the tests depend on that sleep(...) call, but if they don't you could just use QThread::usleep(...)

This revision is now accepted and ready to land.Oct 27 2017, 6:57 AM
arrowd updated this revision to Diff 21448.Oct 27 2017, 6:17 PM
arrowd marked 2 inline comments as done.

Address comments.

plugins/debuggercommon/midebugger.cpp
115

Was just following Win32 coding style.

kfunk accepted this revision.Oct 27 2017, 7:22 PM
This revision was automatically updated to reflect the committed changes.