Git commit 609bacd7f1a94a1aae9518718b5b175ece67141c by Kevin Funk. Committed on 15/01/2016 at 00:46. Pushed by kfunk into branch '5.0'. GDB: Merge console stream into Debug View So you get crucial information during debugging, for example: [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". [New Thread 0x7ffff6f4f700 (LWP 19219)] Program received signal SIGABRT, Aborted. 0x00007ffff6f85267 in __GI_raise (sig=3Dsig@entry=3D6) at ../sysdeps/unix/sysv/linux/raise.c:55 M +5 -6 debuggers/gdb/debugsession.cpp M +4 -1 debuggers/gdb/gdb.cpp http://commits.kde.org/kdevelop/609bacd7f1a94a1aae9518718b5b175ece67141c diff --git a/debuggers/gdb/debugsession.cpp b/debuggers/gdb/debugsession.cpp index 4e4de5e..ee7b120 100644 --- a/debuggers/gdb/debugsession.cpp +++ b/debuggers/gdb/debugsession.cpp @@ -31,6 +31,7 @@ #include #include #include +#include = #include #include @@ -875,12 +876,10 @@ bool DebugSession::startDebugger(KDevelop::ILaunchCon= figuration* cfg) // It's better to do this right away so that the state bit is always // correct. = - /** FIXME: connect ttyStdout. It takes QByteArray, so - I'm not sure what to do. */ -#if 0 - connect(gdb, SIGNAL(applicationOutput(QString)), - this, SIGNAL(ttyStdout(QString))); -#endif + connect(gdb, &GDB::applicationOutput, + this, [this](const QString& output) { + emit applicationStandardOutputLines(output.split(QRegularExpressio= n("[\r\n]"),QString::SkipEmptyParts)); + }); connect(gdb, &GDB::userCommandOutput, this, &DebugSession::gdbUserCommandStdout); connect(gdb, &GDB::internalCommandOutput, this, diff --git a/debuggers/gdb/gdb.cpp b/debuggers/gdb/gdb.cpp index 66fee9e..38b1ba6 100644 --- a/debuggers/gdb/gdb.cpp +++ b/debuggers/gdb/gdb.cpp @@ -311,8 +311,11 @@ void GDB::processLine(const QByteArray& line) } else { if (currentCmd_ && currentCmd_->isUserCommand()) emit userCommandOutput(s.message); - else + else if (s.subkind =3D=3D GDBMI::StreamRecord::Console) { + emit applicationOutput(s.message); + } else { emit internalCommandOutput(s.message); + } = if (currentCmd_) currentCmd_->newOutput(s.message);