Commit c2d6081a authored by hjk's avatar hjk
Browse files

Debugger: Don't check for existence of gdb.inferior.threads()



All supported versions have it in that context.

Change-Id: Iafff4760ba521ffc9abc4e05dbbc9263ed6fe21a
Reviewed-by: default avatarOrgad Shaneh <orgads@gmail.com>
parent c8862ad4
...@@ -400,7 +400,6 @@ def bbsetup(args = ''): ...@@ -400,7 +400,6 @@ def bbsetup(args = ''):
result += '{type="%s",formats="%s"},' % (key, value) result += '{type="%s",formats="%s"},' % (key, value)
result += ']' result += ']'
#result += ',namespace="%s"' % qqNs #result += ',namespace="%s"' % qqNs
result += ',hasInferiorThreadList="%s"' % int(hasInferiorThreadList())
return result return result
registerCommand("bbsetup", bbsetup) registerCommand("bbsetup", bbsetup)
...@@ -572,17 +571,6 @@ def hasPlot(): ...@@ -572,17 +571,6 @@ def hasPlot():
return os.path.isfile(fileName) and os.access(fileName, os.X_OK) return os.path.isfile(fileName) and os.access(fileName, os.X_OK)
#
# Threads
#
def hasInferiorThreadList():
#return False
try:
a = gdb.inferiors()[0].threads()
return True
except:
return False
# #
# VTable # VTable
# #
......
...@@ -230,7 +230,6 @@ GdbEngine::GdbEngine(const DebuggerStartParameters &startParameters) ...@@ -230,7 +230,6 @@ GdbEngine::GdbEngine(const DebuggerStartParameters &startParameters)
m_hasBreakpointNotifications = false; m_hasBreakpointNotifications = false;
m_hasPython = false; m_hasPython = false;
m_registerNamesListed = false; m_registerNamesListed = false;
m_hasInferiorThreadList = false;
m_sourcesListUpdating = false; m_sourcesListUpdating = false;
m_oldestAcceptableToken = -1; m_oldestAcceptableToken = -1;
m_nonDiscardableCount = 0; m_nonDiscardableCount = 0;
...@@ -1875,8 +1874,6 @@ void GdbEngine::handlePythonSetup(const GdbResponse &response) ...@@ -1875,8 +1874,6 @@ void GdbEngine::handlePythonSetup(const GdbResponse &response)
} }
watchHandler()->addTypeFormats(type, formats); watchHandler()->addTypeFormats(type, formats);
} }
const GdbMi hasInferiorThreadList = data["hasInferiorThreadList"];
m_hasInferiorThreadList = (hasInferiorThreadList.toInt() != 0);
} }
} }
...@@ -3759,7 +3756,7 @@ void GdbEngine::handleThreadInfo(const GdbResponse &response) ...@@ -3759,7 +3756,7 @@ void GdbEngine::handleThreadInfo(const GdbResponse &response)
selectThread(other); selectThread(other);
} }
updateViews(); // Adjust Threads combobox. updateViews(); // Adjust Threads combobox.
if (m_hasInferiorThreadList && debuggerCore()->boolSetting(ShowThreadNames)) { if (m_hasPython && debuggerCore()->boolSetting(ShowThreadNames)) {
postCommand("threadnames " + postCommand("threadnames " +
debuggerCore()->action(MaximalStackDepth)->value().toByteArray(), debuggerCore()->action(MaximalStackDepth)->value().toByteArray(),
Discardable, CB(handleThreadNames)); Discardable, CB(handleThreadNames));
......
...@@ -387,7 +387,6 @@ protected: ...@@ -387,7 +387,6 @@ protected:
bool m_isQnxGdb; bool m_isQnxGdb;
bool m_hasBreakpointNotifications; bool m_hasBreakpointNotifications;
bool m_hasPython; bool m_hasPython;
bool m_hasInferiorThreadList;
private: ////////// Inferior Management ////////// private: ////////// Inferior Management //////////
......
Supports Markdown
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