From b59a439517b842a8f74ad7f149ee13c3a3f1cc53 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Thu, 3 Jun 2021 09:53:25 +0900 Subject: Fixed building with -DWITH_TRACE_OUTPUT=ON. This resolves issue #6. Signed-off-by: Michele Calgaro --- kdbg/gdbdriver.cpp | 2 +- kdbg/mydebug.h | 2 +- kdbg/sourcewnd.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/kdbg/gdbdriver.cpp b/kdbg/gdbdriver.cpp index 068a4d9..58464ec 100644 --- a/kdbg/gdbdriver.cpp +++ b/kdbg/gdbdriver.cpp @@ -902,7 +902,7 @@ static ExprValue* parseVar(const char*& s) while (isspace(*p)) p++; if (*p != '=') { - TRACE(TQString().sprintf("parse error: = not found after %s", (const char*)name)); + TRACE(TQString().sprintf("parse error: = not found after %s", name)); return 0; } // skip the '=' and more whitespace diff --git a/kdbg/mydebug.h b/kdbg/mydebug.h index c9f568c..93fbac8 100644 --- a/kdbg/mydebug.h +++ b/kdbg/mydebug.h @@ -19,7 +19,7 @@ #endif #ifdef WANT_TRACE_OUTPUT -# define TRACE(x) (kdDebug() << (const char*)(x) << "\n") +# define TRACE(x) (kdDebug() << (x) << endl) #else # define TRACE(x) ((void)0) #endif diff --git a/kdbg/sourcewnd.cpp b/kdbg/sourcewnd.cpp index 5490666..8d0699c 100644 --- a/kdbg/sourcewnd.cpp +++ b/kdbg/sourcewnd.cpp @@ -275,7 +275,7 @@ void SourceWindow::updateLineItems(const KDebugger* dbg) for (KDebugger::BrkptROIterator bp = dbg->breakpointsBegin(); bp != dbg->breakpointsEnd(); ++bp) { if (fileNameMatches(bp->fileName)) { - TRACE(TQString().sprintf("updating %s:%d", bp->fileName.data(), bp->lineNo)); + TRACE(TQString().sprintf("updating %s:%d", bp->fileName, bp->lineNo)); int i = bp->lineNo; if (i < 0 || i >= int(m_sourceCode.size())) continue; -- cgit v1.2.1