don't instanciate all adaptors at once

This commit is contained in:
Oswald Buddenhagen
2009-10-05 14:59:39 +02:00
parent 94cb4644c2
commit 7313f3d666
4 changed files with 19 additions and 47 deletions

View File

@@ -70,6 +70,7 @@ class CoreGdbAdapter;
class PlainGdbAdapter;
class RemoteGdbAdapter;
class TrkGdbAdapter;
struct TrkOptions;
enum DebuggingHelperState
{
@@ -162,7 +163,6 @@ private:
StackFrame parseStackFrame(const GdbMi &mi, int level);
void connectAdapter();
void disconnectAdapter();
void initializeVariables();
QString fullName(const QString &fileName);
// get one usable name out of these, try full names first
@@ -396,7 +396,7 @@ private:
void setLocals(const QList<GdbMi> &locals);
void connectDebuggingHelperActions();
void disconnectDebuggingHelperActions();
AbstractGdbAdapter *determineAdapter(const DebuggerStartParametersPtr &dp) const;
AbstractGdbAdapter *createAdapter(const DebuggerStartParametersPtr &dp);
bool startModeAllowsDumpers() const;
QString parseDisassembler(const GdbMi &lines);
@@ -423,13 +423,9 @@ private:
DebuggerStartParametersPtr m_startParameters;
// make sure to re-initialize new members in initializeVariables();
// only one of those is active at a given time, available in m_gdbAdapter
AbstractGdbAdapter *m_gdbAdapter; // pointer to one listed below
AttachGdbAdapter *m_attachAdapter; // owned
CoreGdbAdapter *m_coreAdapter; // owned
PlainGdbAdapter *m_plainAdapter; // owned
RemoteGdbAdapter *m_remoteAdapter; // owned
TrkGdbAdapter *m_trkAdapter; // owned
QSharedPointer<TrkOptions> m_trkOptions;
AbstractGdbAdapter *m_gdbAdapter;
public:
QString errorMessage(QProcess::ProcessError error);