forked from qt-creator/qt-creator
debugger: replace static capability check by something potentially dynamic
This does not yet use the potential. Change-Id: I087311fb7d59b46e49f65a84c4420c72a1227ebb Reviewed-by: Aurindam Jana <aurindam.jana@nokia.com>
This commit is contained in:
@@ -1969,9 +1969,9 @@ void GdbEngine::setupEngine()
|
||||
m_gdbAdapter->startAdapter();
|
||||
}
|
||||
|
||||
unsigned GdbEngine::debuggerCapabilities() const
|
||||
bool GdbEngine::hasCapability(unsigned cap) const
|
||||
{
|
||||
unsigned caps = ReverseSteppingCapability
|
||||
if (cap & (ReverseSteppingCapability
|
||||
| AutoDerefPointersCapability
|
||||
| DisassemblerCapability
|
||||
| RegisterCapability
|
||||
@@ -1992,16 +1992,17 @@ unsigned GdbEngine::debuggerCapabilities() const
|
||||
| CatchCapability
|
||||
| OperateByInstructionCapability
|
||||
| RunToLineCapability
|
||||
| MemoryAddressCapability;
|
||||
| MemoryAddressCapability))
|
||||
return true;
|
||||
|
||||
if (startParameters().startMode == AttachCore)
|
||||
return caps;
|
||||
return false;
|
||||
|
||||
// FIXME: Remove in case we have gdb 7.x on Mac.
|
||||
if (startParameters().toolChainAbi.os() == Abi::MacOS)
|
||||
return caps;
|
||||
return false;
|
||||
|
||||
return caps | SnapshotCapability;
|
||||
return cap == SnapshotCapability;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -238,7 +238,7 @@ private: ////////// General Interface //////////
|
||||
virtual void setupInferior();
|
||||
virtual void runEngine();
|
||||
|
||||
virtual unsigned debuggerCapabilities() const;
|
||||
virtual bool hasCapability(unsigned) const;
|
||||
virtual void detachDebugger();
|
||||
virtual void shutdownEngine();
|
||||
virtual void shutdownInferior();
|
||||
|
||||
Reference in New Issue
Block a user