forked from qt-creator/qt-creator
Debugger: Remove GdbCommand::callbackName
This was a debugging aid that has not been needed for a while. Change-Id: Ia79e8e91b6648bdb807836443b01dd325d819640 Reviewed-by: hjk <hjk@theqtcompany.com>
This commit is contained in:
@@ -39,7 +39,7 @@
|
|||||||
namespace Debugger {
|
namespace Debugger {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
#define CB(callback) [this](const DebuggerResponse &r) { callback(r); }, STRINGIFY(callback)
|
#define CB(callback) [this](const DebuggerResponse &r) { callback(r); }
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ using namespace Utils;
|
|||||||
namespace Debugger {
|
namespace Debugger {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
#define CB(callback) [this](const DebuggerResponse &r) { callback(r); }, STRINGIFY(callback)
|
#define CB(callback) [this](const DebuggerResponse &r) { callback(r); }
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -96,7 +96,7 @@ enum { debugPending = 0 };
|
|||||||
|
|
||||||
#define PENDING_DEBUG(s) do { if (debugPending) qDebug() << s; } while (0)
|
#define PENDING_DEBUG(s) do { if (debugPending) qDebug() << s; } while (0)
|
||||||
|
|
||||||
#define CB(callback) [this](const DebuggerResponse &r) { callback(r); }, STRINGIFY(callback)
|
#define CB(callback) [this](const DebuggerResponse &r) { callback(r); }
|
||||||
|
|
||||||
QByteArray GdbEngine::tooltipIName(const QString &exp)
|
QByteArray GdbEngine::tooltipIName(const QString &exp)
|
||||||
{
|
{
|
||||||
@@ -859,20 +859,18 @@ void GdbEngine::runCommand(const DebuggerCommand &command)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void GdbEngine::postCommand(const QByteArray &command, GdbCommandCallback callback,
|
void GdbEngine::postCommand(const QByteArray &command, GdbCommandCallback callback,
|
||||||
const char *callbackName, const QVariant &cookie)
|
const QVariant &cookie)
|
||||||
{
|
{
|
||||||
postCommand(command, NoFlags, callback, callbackName, cookie);
|
postCommand(command, NoFlags, callback, cookie);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GdbEngine::postCommand(const QByteArray &command, GdbCommandFlags flags,
|
void GdbEngine::postCommand(const QByteArray &command, GdbCommandFlags flags,
|
||||||
GdbCommandCallback callback, const char *callbackName,
|
GdbCommandCallback callback, const QVariant &cookie)
|
||||||
const QVariant &cookie)
|
|
||||||
{
|
{
|
||||||
GdbCommand cmd;
|
GdbCommand cmd;
|
||||||
cmd.command = command;
|
cmd.command = command;
|
||||||
cmd.flags = flags;
|
cmd.flags = flags;
|
||||||
cmd.callback = callback;
|
cmd.callback = callback;
|
||||||
cmd.callbackName = callbackName;
|
|
||||||
cmd.cookie = cookie;
|
cmd.cookie = cookie;
|
||||||
postCommandHelper(cmd);
|
postCommandHelper(cmd);
|
||||||
}
|
}
|
||||||
@@ -888,10 +886,10 @@ void GdbEngine::postCommandHelper(const GdbCommand &cmd)
|
|||||||
|
|
||||||
if (cmd.flags & RebuildBreakpointModel) {
|
if (cmd.flags & RebuildBreakpointModel) {
|
||||||
++m_pendingBreakpointRequests;
|
++m_pendingBreakpointRequests;
|
||||||
PENDING_DEBUG(" BRWAKPOINT MODEL:" << cmd.command << "=>" << cmd.callbackName
|
PENDING_DEBUG(" BRWAKPOINT MODEL:" << cmd.command
|
||||||
<< "INCREMENTS PENDING TO" << m_pendingBreakpointRequests);
|
<< "INCREMENTS PENDING TO" << m_pendingBreakpointRequests);
|
||||||
} else {
|
} else {
|
||||||
PENDING_DEBUG(" OTHER (IN):" << cmd.command << "=>" << cmd.callbackName
|
PENDING_DEBUG(" OTHER (IN):" << cmd.command
|
||||||
<< "LEAVES PENDING WATCH AT" << m_uncompleted.size()
|
<< "LEAVES PENDING WATCH AT" << m_uncompleted.size()
|
||||||
<< "LEAVES PENDING BREAKPOINT AT" << m_pendingBreakpointRequests);
|
<< "LEAVES PENDING BREAKPOINT AT" << m_pendingBreakpointRequests);
|
||||||
}
|
}
|
||||||
@@ -938,8 +936,7 @@ void GdbEngine::flushQueuedCommands()
|
|||||||
showStatusMessage(tr("Processing queued commands"), 1000);
|
showStatusMessage(tr("Processing queued commands"), 1000);
|
||||||
while (!m_commandsToRunOnTemporaryBreak.isEmpty()) {
|
while (!m_commandsToRunOnTemporaryBreak.isEmpty()) {
|
||||||
GdbCommand cmd = m_commandsToRunOnTemporaryBreak.takeFirst();
|
GdbCommand cmd = m_commandsToRunOnTemporaryBreak.takeFirst();
|
||||||
showMessage(_("RUNNING QUEUED COMMAND " + cmd.command + ' '
|
showMessage(_("RUNNING QUEUED COMMAND " + cmd.command));
|
||||||
+ (cmd.callbackName ? cmd.callbackName : "<unnamed callback>")));
|
|
||||||
flushCommand(cmd);
|
flushCommand(cmd);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1006,10 +1003,7 @@ void GdbEngine::commandTimeout()
|
|||||||
const GdbCommand &cmd = m_cookieForToken.value(key);
|
const GdbCommand &cmd = m_cookieForToken.value(key);
|
||||||
if (!(cmd.flags & NonCriticalResponse))
|
if (!(cmd.flags & NonCriticalResponse))
|
||||||
killIt = true;
|
killIt = true;
|
||||||
QByteArray msg = QByteArray::number(key);
|
showMessage(_(QByteArray::number(key) + ": " + cmd.command));
|
||||||
msg += ": " + cmd.command + " => ";
|
|
||||||
msg += cmd.callbackName ? cmd.callbackName : "<unnamed callback>";
|
|
||||||
showMessage(_(msg));
|
|
||||||
}
|
}
|
||||||
if (killIt) {
|
if (killIt) {
|
||||||
QStringList commands;
|
QStringList commands;
|
||||||
@@ -1184,14 +1178,14 @@ void GdbEngine::handleResultRecord(DebuggerResponse *response)
|
|||||||
|
|
||||||
if (cmd.flags & RebuildBreakpointModel) {
|
if (cmd.flags & RebuildBreakpointModel) {
|
||||||
--m_pendingBreakpointRequests;
|
--m_pendingBreakpointRequests;
|
||||||
PENDING_DEBUG(" BREAKPOINT" << cmd.command << "=>" << cmd.callbackName
|
PENDING_DEBUG(" BREAKPOINT" << cmd.command
|
||||||
<< "DECREMENTS PENDING TO" << m_uncompleted.size());
|
<< "DECREMENTS PENDING TO" << m_uncompleted.size());
|
||||||
if (m_pendingBreakpointRequests <= 0) {
|
if (m_pendingBreakpointRequests <= 0) {
|
||||||
PENDING_DEBUG("\n\n ... AND TRIGGERS BREAKPOINT MODEL UPDATE\n");
|
PENDING_DEBUG("\n\n ... AND TRIGGERS BREAKPOINT MODEL UPDATE\n");
|
||||||
attemptBreakpointSynchronization();
|
attemptBreakpointSynchronization();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
PENDING_DEBUG(" OTHER (OUT):" << cmd.command << "=>" << cmd.callbackName
|
PENDING_DEBUG(" OTHER (OUT):" << cmd.command
|
||||||
<< "LEAVES PENDING WATCH AT" << m_uncompleted.size()
|
<< "LEAVES PENDING WATCH AT" << m_uncompleted.size()
|
||||||
<< "LEAVES PENDING BREAKPOINT AT" << m_pendingBreakpointRequests);
|
<< "LEAVES PENDING BREAKPOINT AT" << m_pendingBreakpointRequests);
|
||||||
}
|
}
|
||||||
@@ -2292,8 +2286,7 @@ void GdbEngine::setTokenBarrier()
|
|||||||
if (!(it.value().flags & Discardable)) {
|
if (!(it.value().flags & Discardable)) {
|
||||||
qDebug() << "TOKEN: " << it.key()
|
qDebug() << "TOKEN: " << it.key()
|
||||||
<< "CMD:" << it.value().command
|
<< "CMD:" << it.value().command
|
||||||
<< " FLAGS:" << it.value().flags
|
<< " FLAGS:" << it.value().flags;
|
||||||
<< " CALLBACK:" << it.value().callbackName;
|
|
||||||
good = false;
|
good = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -4668,7 +4661,7 @@ void GdbEngine::resetCommandQueue()
|
|||||||
QTextStream ts(&msg);
|
QTextStream ts(&msg);
|
||||||
ts << "RESETING COMMAND QUEUE. LEFT OVER TOKENS: ";
|
ts << "RESETING COMMAND QUEUE. LEFT OVER TOKENS: ";
|
||||||
foreach (const GdbCommand &cookie, m_cookieForToken)
|
foreach (const GdbCommand &cookie, m_cookieForToken)
|
||||||
ts << "CMD:" << cookie.command << cookie.callbackName;
|
ts << "CMD:" << cookie.command;
|
||||||
m_cookieForToken.clear();
|
m_cookieForToken.clear();
|
||||||
showMessage(msg);
|
showMessage(msg);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -179,12 +179,11 @@ private: ////////// Gdb Command Management //////////
|
|||||||
struct GdbCommand
|
struct GdbCommand
|
||||||
{
|
{
|
||||||
GdbCommand()
|
GdbCommand()
|
||||||
: flags(0), callback(0), callbackName(0)
|
: flags(0), callback(0)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
int flags;
|
int flags;
|
||||||
GdbCommandCallback callback;
|
GdbCommandCallback callback;
|
||||||
const char *callbackName;
|
|
||||||
QByteArray command;
|
QByteArray command;
|
||||||
QVariant cookie;
|
QVariant cookie;
|
||||||
QTime postTime;
|
QTime postTime;
|
||||||
@@ -200,11 +199,9 @@ protected:
|
|||||||
void postCommand(const QByteArray &command,
|
void postCommand(const QByteArray &command,
|
||||||
GdbCommandFlags flags,
|
GdbCommandFlags flags,
|
||||||
GdbCommandCallback callback = 0,
|
GdbCommandCallback callback = 0,
|
||||||
const char *callbackName = 0,
|
|
||||||
const QVariant &cookie = QVariant());
|
const QVariant &cookie = QVariant());
|
||||||
void postCommand(const QByteArray &command,
|
void postCommand(const QByteArray &command,
|
||||||
GdbCommandCallback callback = 0,
|
GdbCommandCallback callback = 0,
|
||||||
const char *callbackName = 0,
|
|
||||||
const QVariant &cookie = QVariant());
|
const QVariant &cookie = QVariant());
|
||||||
private:
|
private:
|
||||||
void postCommandHelper(const GdbCommand &cmd);
|
void postCommandHelper(const GdbCommand &cmd);
|
||||||
|
|||||||
@@ -49,7 +49,7 @@
|
|||||||
namespace Debugger {
|
namespace Debugger {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
#define CB(callback) [this](const DebuggerResponse &r) { callback(r); }, STRINGIFY(callback)
|
#define CB(callback) [this](const DebuggerResponse &r) { callback(r); }
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ using namespace Utils;
|
|||||||
namespace Debugger {
|
namespace Debugger {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
#define CB(callback) [this](const DebuggerResponse &r) { callback(r); }, STRINGIFY(callback)
|
#define CB(callback) [this](const DebuggerResponse &r) { callback(r); }
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
|
|||||||
Reference in New Issue
Block a user