Commit 46647f49 authored by Friedemann Kleint's avatar Friedemann Kleint

Debugger[New CDB]: Move from namespace Cdb to Internal.

parent e8204215
......@@ -34,7 +34,7 @@
#include "bytearrayinputstream.h"
namespace Debugger {
namespace Cdb {
namespace Internal {
ByteArrayInputStream::ByteArrayInputStream(QByteArray &ba) :
m_target(ba), m_integerBase(10), m_hexPrefix(false), m_width(0)
......@@ -122,5 +122,5 @@ QByteArray simplify(const QByteArray &inIn)
return in;
}
} // namespace Cdb
} // namespace Internal
} // namespace Debugger
......@@ -38,7 +38,7 @@
#include <QtCore/QString>
namespace Debugger {
namespace Cdb {
namespace Internal {
class ByteArrayInputStream
{
......@@ -106,7 +106,7 @@ QByteArray trimFront(QByteArray in);
QByteArray trimBack(QByteArray in);
QByteArray simplify(const QByteArray &inIn);
} // namespace Cdb
} // namespace Internal
} // namespace Debugger
#endif // BYTEARRAYINPUTSTREAM_H
This diff is collapsed.
......@@ -43,7 +43,7 @@
#include <QtCore/QTime>
namespace Debugger {
namespace Cdb {
namespace Internal {
class DisassemblerAgent;
struct CdbBuiltinCommand;
......@@ -83,8 +83,8 @@ public:
virtual void shutdownInferior();
virtual void shutdownEngine();
virtual void detachDebugger();
virtual void updateWatchData(const Debugger::Internal::WatchData &data,
const Debugger::Internal::WatchUpdateFlags & flags = Debugger::Internal::WatchUpdateFlags());
virtual void updateWatchData(const WatchData &data,
const WatchUpdateFlags & flags = WatchUpdateFlags());
virtual unsigned debuggerCapabilities() const;
virtual void setRegisterValue(int regnr, const QString &value);
......@@ -100,7 +100,7 @@ public:
virtual void executeRunToLine(const QString &fileName, int lineNumber);
virtual void executeRunToFunction(const QString &functionName);
virtual void executeJumpToLine(const QString &fileName, int lineNumber);
virtual void assignValueInDebugger(const Debugger::Internal::WatchData *w, const QString &expr, const QVariant &value);
virtual void assignValueInDebugger(const WatchData *w, const QString &expr, const QVariant &value);
virtual void executeDebuggerCommand(const QString &command);
virtual void activateFrame(int index);
......@@ -110,8 +110,8 @@ public:
virtual bool acceptsBreakpoint(BreakpointId id) const;
virtual void attemptBreakpointSynchronization();
virtual void fetchDisassembler(Debugger::Internal::DisassemblerAgent *agent);
virtual void fetchMemory(Debugger::Internal::MemoryAgent *, QObject *, quint64 addr, quint64 length);
virtual void fetchDisassembler(DisassemblerAgent *agent);
virtual void fetchMemory(MemoryAgent *, QObject *, quint64 addr, quint64 length);
virtual void reloadModules();
virtual void loadSymbols(const QString &moduleName);
......@@ -209,7 +209,7 @@ private:
bool m_sourceStepInto;
};
} // namespace Cdb
} // namespace Internal
} // namespace Debugger
#endif // DEBUGGER_CDBENGINE_H
......@@ -52,7 +52,7 @@ static const char breakEventKeyC[] = "BreakEvent";
static const char is64bitKeyC[] = "64bit";
namespace Debugger {
namespace Cdb {
namespace Internal {
CdbOptions::CdbOptions() :
enabled(false), is64bit(false)
......
......@@ -41,7 +41,7 @@ class QSettings;
QT_END_NAMESPACE
namespace Debugger {
namespace Cdb {
namespace Internal {
struct CdbOptions
{
......
......@@ -59,7 +59,7 @@ static const char *dgbToolsDownloadLink32C = "http://www.microsoft.com/whdc/devt
static const char *dgbToolsDownloadLink64C = "http://www.microsoft.com/whdc/devtools/debugging/install64bit.Mspx";
namespace Debugger {
namespace Cdb {
namespace Internal {
struct EventsDescription {
const char *abbreviation;
......
......@@ -48,7 +48,7 @@ class QTimer;
QT_END_NAMESPACE
namespace Debugger {
namespace Cdb {
namespace Internal {
// Widget displaying a list of break events for the 'sxe' command
// with a checkbox to enable 'break' and optionally a QLineEdit for
......
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>Debugger::Cdb::CdbOptionsPageWidget2</class>
<class>Debugger::Internal::CdbOptionsPageWidget2</class>
<widget class="QWidget" name="Debugger::Cdb::CdbOptionsPageWidget2">
<property name="geometry">
<rect>
......
......@@ -51,15 +51,15 @@
#include <cctype>
namespace Debugger {
namespace Cdb {
namespace Internal {
// Convert breakpoint in CDB syntax.
QByteArray cdbAddBreakpointCommand(const Debugger::Internal::BreakpointParameters &bpIn, bool oneshot, int id)
QByteArray cdbAddBreakpointCommand(const BreakpointParameters &bpIn, bool oneshot, int id)
{
#ifdef Q_OS_WIN
const Debugger::Internal::BreakpointParameters bp = Debugger::Internal::fixWinMSVCBreakpoint(bpIn);
const BreakpointParameters bp = fixWinMSVCBreakpoint(bpIn);
#else
const Debugger::Internal::BreakpointParameters bp = bpIn;
const BreakpointParameters bp = bpIn;
#endif
QByteArray rc;
......@@ -68,29 +68,29 @@ QByteArray cdbAddBreakpointCommand(const Debugger::Internal::BreakpointParameter
if (bp.threadSpec >= 0)
str << '~' << bp.threadSpec << ' ';
str << (bp.type == Debugger::Internal::Watchpoint ? "ba" : "bp");
str << (bp.type == Watchpoint ? "ba" : "bp");
if (id >= 0)
str << id;
str << ' ';
if (oneshot)
str << "/1 ";
switch (bp.type) {
case Debugger::Internal::UnknownType:
case Debugger::Internal::BreakpointAtCatch:
case Debugger::Internal::BreakpointAtThrow:
case Debugger::Internal::BreakpointAtMain:
case UnknownType:
case BreakpointAtCatch:
case BreakpointAtThrow:
case BreakpointAtMain:
QTC_ASSERT(false, return QByteArray(); )
break;
case Debugger::Internal::BreakpointByAddress:
case BreakpointByAddress:
str << hex << hexPrefixOn << bp.address << hexPrefixOff << dec;
break;
case Debugger::Internal::BreakpointByFunction:
case BreakpointByFunction:
str << bp.functionName;
break;
case Debugger::Internal::BreakpointByFileAndLine:
case BreakpointByFileAndLine:
str << '`' << QDir::toNativeSeparators(bp.fileName) << ':' << bp.lineNumber << '`';
break;
case Debugger::Internal::Watchpoint:
case Watchpoint:
str << "rw 1 " << hex << hexPrefixOn << bp.address << hexPrefixOff << dec;
break;
}
......@@ -147,7 +147,7 @@ QVariant cdbIntegerValue(const QByteArray &t)
3 Id: 133c.38c Suspend: 1 Teb: 000007ff`fffd7000 Unfrozen "QThread"
\endcode */
static inline bool parseThread(QByteArray line, Debugger::Internal::ThreadData *thread, bool *current)
static inline bool parseThread(QByteArray line, ThreadData *thread, bool *current)
{
*current = false;
if (line.size() < 5)
......@@ -223,20 +223,20 @@ WinException::WinException() :
{
}
void WinException::fromGdbMI(const Debugger::Internal::GdbMi &gdbmi)
void WinException::fromGdbMI(const GdbMi &gdbmi)
{
exceptionCode = gdbmi.findChild("exceptionCode").data().toUInt();
exceptionFlags = gdbmi.findChild("exceptionFlags").data().toUInt();
exceptionAddress = gdbmi.findChild("exceptionAddress").data().toULongLong();
firstChance = gdbmi.findChild("firstChance").data() != "0";
const Debugger::Internal::GdbMi ginfo1 = gdbmi.findChild("exceptionInformation0");
const GdbMi ginfo1 = gdbmi.findChild("exceptionInformation0");
if (ginfo1.isValid()) {
info1 = ginfo1.data().toULongLong();
const Debugger::Internal::GdbMi ginfo2 = gdbmi.findChild("exceptionInformation1");
const GdbMi ginfo2 = gdbmi.findChild("exceptionInformation1");
if (ginfo2.isValid())
info2 = ginfo1.data().toULongLong();
}
const Debugger::Internal::GdbMi gLineNumber = gdbmi.findChild("exceptionLine");
const GdbMi gLineNumber = gdbmi.findChild("exceptionLine");
if (gLineNumber.isValid()) {
lineNumber = gLineNumber.data().toInt();
file = gdbmi.findChild("exceptionFile").data();
......@@ -249,8 +249,8 @@ QString WinException::toString(bool includeLocation) const
QString rc;
QTextStream str(&rc);
#ifdef Q_OS_WIN
Debugger::Internal::formatWindowsException(exceptionCode, exceptionAddress,
exceptionFlags, info1, info2, str);
formatWindowsException(exceptionCode, exceptionAddress,
exceptionFlags, info1, info2, str);
#endif
if (includeLocation) {
if (lineNumber) {
......@@ -272,5 +272,5 @@ QDebug operator<<(QDebug s, const WinException &e)
return s;
}
} // namespace Cdb
} // namespace Internal
} // namespace Debugger
......@@ -51,12 +51,9 @@ class BreakpointParameters;
struct ThreadData;
class Register;
class GdbMi;
} // namespace Internal
namespace Cdb {
// Convert breakpoint in CDB syntax.
QByteArray cdbAddBreakpointCommand(const Debugger::Internal::BreakpointParameters &d, bool oneshot = false, int id = -1);
QByteArray cdbAddBreakpointCommand(const BreakpointParameters &d, bool oneshot = false, int id = -1);
// Convert a CDB integer value: '00000000`0012a290' -> '12a290', '0n10' ->'10'
QByteArray fixCdbIntegerValue(QByteArray t, bool stripLeadingZeros = false, int *basePtr = 0);
......@@ -70,7 +67,7 @@ QString StringFromBase64EncodedUtf16(const QByteArray &a);
struct WinException
{
WinException();
void fromGdbMI(const Debugger::Internal::GdbMi &);
void fromGdbMI(const GdbMi &);
QString toString(bool includeLocation = false) const;
unsigned exceptionCode;
......@@ -86,7 +83,7 @@ struct WinException
QDebug operator<<(QDebug s, const WinException &e);
} // namespace Cdb
} // namespace Internal
} // namespace Debugger
#endif // CDBPARSEHELPERS_H
......@@ -767,8 +767,8 @@ static inline QString cdbRemoteHelp()
"ssl:proto=Protocol,{certuser=Cert|machuser=Cert},server=Server,port=Socket[,password=Password]\n"
"ssl:proto=Protocol,{certuser=Cert|machuser=Cert},clicon=Server,port=Socket[,password=Password]";
const QString ext32 = QDir::toNativeSeparators(Debugger::Cdb::CdbEngine::extensionLibraryName(false));
const QString ext64 = QDir::toNativeSeparators(Debugger::Cdb::CdbEngine::extensionLibraryName(true));
const QString ext32 = QDir::toNativeSeparators(CdbEngine::extensionLibraryName(false));
const QString ext64 = QDir::toNativeSeparators(CdbEngine::extensionLibraryName(true));
return StartRemoteCdbDialog::tr(
"<html><body><p>The remote CDB needs to load the matching Qt Creator CDB extension "
"(<code>%1</code> or <code>%2</code>, respectively).</p><p>Copy it onto the remote machine and set the "
......
......@@ -405,7 +405,7 @@ const char * const SNAPSHOT_KEY = "Ctrl+D,Ctrl+S";
} // namespace Constants
namespace Cdb {
namespace Internal {
void addCdb2OptionPages(QList<Core::IOptionsPage*> *);
} // namespace Cdb
......@@ -3019,7 +3019,7 @@ void DebuggerPluginPrivate::extensionsInitialized()
if (m_cmdLineEnabledEngines & GdbEngineType)
addGdbOptionPages(&engineOptionPages);
#ifdef Q_OS_WIN
Debugger::Cdb::addCdb2OptionPages(&engineOptionPages);
addCdb2OptionPages(&engineOptionPages);
#endif
#ifdef WITH_LLDB
if (m_cmdLineEnabledEngines & LldbEngineType)
......
......@@ -71,7 +71,7 @@ using namespace Debugger::Internal;
namespace Debugger {
namespace Cdb {
namespace Internal {
bool isCdbEngineEnabled(); // Check the configuration page
ConfigurationCheck checkCdbConfiguration(ToolChainType toolChain);
DebuggerEngine *createCdbEngine(const DebuggerStartParameters &, QString *error);
......@@ -321,7 +321,7 @@ DebuggerRunControl::DebuggerRunControl(RunConfiguration *runConfiguration,
d->m_engine = createScriptEngine(sp);
break;
case CdbEngineType:
d->m_engine = Cdb::createCdbEngine(sp, &d->m_errorMessage);
d->m_engine = Internal::createCdbEngine(sp, &d->m_errorMessage);
break;
case PdbEngineType:
d->m_engine = createPdbEngine(sp);
......@@ -406,7 +406,7 @@ DEBUGGER_EXPORT ConfigurationCheck checkDebugConfiguration(ToolChainType toolCha
}
break;
case ToolChain_MSVC:
result = Cdb::checkCdbConfiguration(toolChain);
result = Internal::checkCdbConfiguration(toolChain);
if (!result) {
result.errorMessage += msgEngineNotAvailable("Cdb");
result.settingsPage = QLatin1String("Cdb");
......
......@@ -11,7 +11,7 @@
#include <QtCore/QTimer>
namespace Debugger {
namespace Cdb {
namespace Internal {
DebuggerEngine *createCdbEngine(const DebuggerStartParameters &, QString *);
}
namespace Internal {
......@@ -61,7 +61,7 @@ QmlCppEngine::QmlCppEngine(const DebuggerStartParameters &sp)
d->m_cppEngine = createGdbEngine(sp);
} else {
QString errorMessage;
d->m_cppEngine = Debugger::Cdb::createCdbEngine(sp, &errorMessage);
d->m_cppEngine = Debugger::Internal::createCdbEngine(sp, &errorMessage);
if (!d->m_cppEngine) {
qWarning("%s", qPrintable(errorMessage));
return;
......
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