Commit 845ee6a6 authored by David Schulz's avatar David Schulz

Cdb: Replace CdbResponse with DebuggerResponse.

Change-Id: I2fddd5904de665bc7e6731ee4be69639d82258a0
Reviewed-by: default avatarNiels Weber <niels.weber@theqtcompany.com>
parent be8290ee
This diff is collapsed.
...@@ -54,35 +54,13 @@ struct MemoryViewCookie; ...@@ -54,35 +54,13 @@ struct MemoryViewCookie;
class ByteArrayInputStream; class ByteArrayInputStream;
class GdbMi; class GdbMi;
class CdbResponse
{
// TODO: replace with DebuggerResponse
public:
CdbResponse()
: token(-1), success(false)
{}
void clear()
{
token = -1;
reply.clear();
errorMessage.clear();
success = false;
}
int token;
QByteArray reply;
QByteArray errorMessage;
bool success;
};
class CdbEngine : public DebuggerEngine class CdbEngine : public DebuggerEngine
{ {
Q_OBJECT Q_OBJECT
public: public:
typedef QSharedPointer<CdbCommand> CdbCommandPtr; typedef QSharedPointer<CdbCommand> CdbCommandPtr;
typedef std::function<void(const CdbResponse &)> CommandHandler; typedef std::function<void(const DebuggerResponse &)> CommandHandler;
CdbEngine(const DebuggerRunParameters &sp); CdbEngine(const DebuggerRunParameters &sp);
~CdbEngine(); ~CdbEngine();
...@@ -224,32 +202,31 @@ private: ...@@ -224,32 +202,31 @@ private:
void postResolveSymbol(const QString &module, const QString &function, void postResolveSymbol(const QString &module, const QString &function,
DisassemblerAgent *agent); DisassemblerAgent *agent);
// Builtin commands // Builtin commands
void handleStackTrace(const CdbResponse &); void handleStackTrace(const DebuggerResponse &);
void handleRegisters(const CdbResponse &); void handleRegisters(const DebuggerResponse &);
void handleDisassembler(const CdbResponse &, DisassemblerAgent *agent); void handleDisassembler(const DebuggerResponse &, DisassemblerAgent *agent);
void handleJumpToLineAddressResolution(const CdbResponse &response, const ContextData &context); void handleJumpToLineAddressResolution(const DebuggerResponse &response, const ContextData &context);
void handleExpression(const CdbResponse &command, BreakpointModelId id, const GdbMi &stopReason); void handleExpression(const DebuggerResponse &command, BreakpointModelId id, const GdbMi &stopReason);
void handleResolveSymbol(const CdbResponse &command, const QString &symbol, DisassemblerAgent *agent); void handleResolveSymbol(const DebuggerResponse &command, const QString &symbol, DisassemblerAgent *agent);
void handleResolveSymbolHelper(const QList<quint64> &addresses, DisassemblerAgent *agent); void handleResolveSymbolHelper(const QList<quint64> &addresses, DisassemblerAgent *agent);
void handleBreakInsert(const CdbResponse &response, const BreakpointModelId &bpId); void handleBreakInsert(const DebuggerResponse &response, const BreakpointModelId &bpId);
void handleCheckWow64(const CdbResponse &response, const GdbMi &stack); void handleCheckWow64(const DebuggerResponse &response, const GdbMi &stack);
void ensureUsing32BitStackInWow64(const CdbResponse &response, const GdbMi &stack); void ensureUsing32BitStackInWow64(const DebuggerResponse &response, const GdbMi &stack);
void handleSwitchWow64Stack(const CdbResponse &response); void handleSwitchWow64Stack(const DebuggerResponse &response);
void jumpToAddress(quint64 address); void jumpToAddress(quint64 address);
void handleCreateFullBackTrace(const CdbResponse &response); void handleCreateFullBackTrace(const DebuggerResponse &response);
// Extension commands // Extension commands
void handleThreads(const CdbResponse &response); void handleThreads(const DebuggerResponse &response);
void handlePid(const CdbResponse &response); void handlePid(const DebuggerResponse &response);
void handleLocals(const CdbResponse &response, bool partialUpdate); void handleLocals(const DebuggerResponse &response, bool partialUpdate);
void handleExpandLocals(const CdbResponse &response); void handleExpandLocals(const DebuggerResponse &response);
void handleRegistersExt(const CdbResponse &response); void handleRegistersExt(const DebuggerResponse &response);
void handleModules(const CdbResponse &response); void handleModules(const DebuggerResponse &response);
void handleMemory(const CdbResponse &response, const MemoryViewCookie &memViewCookie); void handleMemory(const DebuggerResponse &response, const MemoryViewCookie &memViewCookie);
void handleWidgetAt(const CdbResponse &response); void handleWidgetAt(const DebuggerResponse &response);
void handleBreakPoints(const CdbResponse &response); void handleBreakPoints(const DebuggerResponse &response);
void handleBreakPoints(const GdbMi &value); void handleAdditionalQmlStack(const DebuggerResponse &response);
void handleAdditionalQmlStack(const CdbResponse &response);
NormalizedSourceFileName sourceMapNormalizeFileNameFromDebugger(const QString &f); NormalizedSourceFileName sourceMapNormalizeFileNameFromDebugger(const QString &f);
void doUpdateLocals(const UpdateParameters &params) override; void doUpdateLocals(const UpdateParameters &params) override;
void updateAll() override; void updateAll() override;
...@@ -269,7 +246,8 @@ private: ...@@ -269,7 +246,8 @@ private:
ProjectExplorer::DeviceProcessSignalOperation::Ptr m_signalOperation; ProjectExplorer::DeviceProcessSignalOperation::Ptr m_signalOperation;
int m_nextCommandToken; int m_nextCommandToken;
QList<CdbCommandPtr> m_builtinCommandQueue; QList<CdbCommandPtr> m_builtinCommandQueue;
CdbResponse m_currentBuiltinResponse; //!< Current command whose output is recorded. QByteArray m_currentBuiltinResponse;
int m_currentBuiltinResponseToken;
QList<CdbCommandPtr> m_extensionCommandQueue; QList<CdbCommandPtr> m_extensionCommandQueue;
QMap<QString, NormalizedSourceFileName> m_normalizedFileCache; QMap<QString, NormalizedSourceFileName> m_normalizedFileCache;
const QByteArray m_extensionCommandPrefixBA; //!< Library name used as prefix const QByteArray m_extensionCommandPrefixBA; //!< Library name used as prefix
......
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