From e2f86d9e48bd3ba424079fe34b002a7cbd4c63db Mon Sep 17 00:00:00 2001 From: hjk Date: Thu, 17 Jan 2013 13:20:04 +0100 Subject: Debugger: Speed up disassembly retrieval This skips the case of "disassembling a function given an address" with indeterministic time behaviour and and immediately falls back to the fixed range version instead. Change-Id: I90ec56198a7d767bcf0a9ffb030637c2ee5c617a Reviewed-by: Kai Koehne --- src/plugins/debugger/gdb/gdbengine.cpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/plugins/debugger/gdb/gdbengine.cpp b/src/plugins/debugger/gdb/gdbengine.cpp index 9b63495d16..c9588c2489 100644 --- a/src/plugins/debugger/gdb/gdbengine.cpp +++ b/src/plugins/debugger/gdb/gdbengine.cpp @@ -4434,11 +4434,15 @@ void GdbEngine::fetchDisassemblerByCliPointMixed(const DisassemblerAgentCookie & void GdbEngine::fetchDisassemblerByCliPointPlain(const DisassemblerAgentCookie &ac0) { - DisassemblerAgentCookie ac = ac0; - QTC_ASSERT(ac.agent, return); - postCommand(disassemblerCommand(ac.agent->location(), false), Discardable, - CB(handleFetchDisassemblerByCliPointPlain), - QVariant::fromValue(ac)); + // This here + // DisassemblerAgentCookie ac = ac0; + // QTC_ASSERT(ac.agent, return); + // postCommand(disassemblerCommand(ac.agent->location(), false), Discardable, + // CB(handleFetchDisassemblerByCliPointPlain), + // QVariant::fromValue(ac)); + // takes far to long if function boundaries are not hit. + // Skip this feature and immediately fall back to the 'range' verion: + fetchDisassemblerByCliRangePlain(ac0); } void GdbEngine::fetchDisassemblerByCliRangeMixed(const DisassemblerAgentCookie &ac0) -- cgit v1.2.3