Commit 57e452e5 authored by Kevin Funk's avatar Kevin Funk

debuggercommon: Remove number of lines printed

... without losing any information though.

Also, instead of:
   Debugger state changed to: QFlags(0x2|0x100) ""

We now get something like (for Qt >= v5.8.0):
  Debugger state changed to: QFlags<KDevMI::DBGStateFlag>(s_appNotStarted|s_dbgBusy) "" - changes: QFlags<KDevMI::DBGStateFlag>(s_none)
parent 39c110e3
......@@ -5,6 +5,7 @@ set(debuggercommon_SRCS
mi/miparser.cpp
mi/micommand.cpp
mi/micommandqueue.cpp
dbgglobal.cpp
dialogs/selectcoredialog.cpp
# debug session & debugger
midebugger.cpp
......
/* This file is part of the KDE project
Copyright (C) 2018 Kevin Funk <kfunk@kde.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
*/
#include "dbgglobal.h"
#include "moc_dbgglobal.cpp"
......@@ -18,10 +18,14 @@
#ifndef _DBGGLOBAL_H_
#define _DBGGLOBAL_H_
#include <qobjectdefs.h>
#include <QFlags>
namespace KDevMI
{
#if QT_VERSION >= QT_VERSION_CHECK(5,8,0)
Q_NAMESPACE
#endif
enum DBGStateFlag
{
......@@ -46,6 +50,9 @@ enum DBGStateFlag
/// Set when the debugger failed to start
s_dbgFailedStart = 1 << 13,
};
#if QT_VERSION >= QT_VERSION_CHECK(5,8,0)
Q_ENUM_NS(DBGStateFlag)
#endif
Q_DECLARE_FLAGS(DBGStateFlags, DBGStateFlag)
enum DataType { typeUnknown, typeValue, typePointer, typeReference,
......
......@@ -146,7 +146,9 @@ void MIDebugger::readyReadStandardError()
void MIDebugger::processLine(const QByteArray& line)
{
qCDebug(DEBUGGERCOMMON) << "Debugger (" << m_process->pid() <<") output: " << line;
if (line != "(gdb) ") {
qCDebug(DEBUGGERCOMMON) << "Debugger output (pid =" << m_process->pid() << "): " << line;
}
FileSymbol file;
file.contents = line;
......
......@@ -442,7 +442,6 @@ void MIDebugSession::debuggerStateChange(DBGStateFlags oldState, DBGStateFlags n
out += QString::number(i);
}
}
qCDebug(DEBUGGERCOMMON) << "Debugger state change:" << out;
}
}
......@@ -488,7 +487,7 @@ void MIDebugSession::handleDebuggerStateChange(DBGStateFlags oldState, DBGStateF
}
// And now? :-)
qCDebug(DEBUGGERCOMMON) << "Debugger state changed to: " << newState << message;
qCDebug(DEBUGGERCOMMON) << "Debugger state changed to:" << newState << message << "- changes:" << changedState;
if (!message.isEmpty())
emit showMessage(message, 3000);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment