Commit 06abe6b8 authored by hjk's avatar hjk
Browse files

debugger: fix frame switching when using core files

parent d1305884
......@@ -149,6 +149,9 @@ void CoreGdbAdapter::handleTargetCore1(const GdbResponse &response)
emit inferiorStartFailed(tr("No binary found."));
} else {
m_executable = console.data().mid(pos1 + 1, pos2 - pos1 - 1);
// Strip off command line arguments. FIXME: make robust.
if (m_executable.contains(' '))
m_executable = m_executable.section(' ', 0, 0);
QTC_ASSERT(!m_executable.isEmpty(), /**/);
// Finish extra round.
m_engine->postCommand(_("detach"), CB(handleDetach1));
......
......@@ -2368,7 +2368,7 @@ void GdbEngine::handleStackListFrames(const GdbResponse &response)
void GdbEngine::activateFrame(int frameIndex)
{
m_manager->resetLocation();
if (state() != InferiorStopped)
if (state() != InferiorStopped && state() != InferiorUnrunnable)
return;
StackHandler *stackHandler = manager()->stackHandler();
......
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