forked from qt-creator/qt-creator
debugger: fix frame switching when using core files
This commit is contained in:
@@ -149,6 +149,9 @@ void CoreGdbAdapter::handleTargetCore1(const GdbResponse &response)
|
|||||||
emit inferiorStartFailed(tr("No binary found."));
|
emit inferiorStartFailed(tr("No binary found."));
|
||||||
} else {
|
} else {
|
||||||
m_executable = console.data().mid(pos1 + 1, pos2 - pos1 - 1);
|
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(), /**/);
|
QTC_ASSERT(!m_executable.isEmpty(), /**/);
|
||||||
// Finish extra round.
|
// Finish extra round.
|
||||||
m_engine->postCommand(_("detach"), CB(handleDetach1));
|
m_engine->postCommand(_("detach"), CB(handleDetach1));
|
||||||
|
|||||||
@@ -2368,7 +2368,7 @@ void GdbEngine::handleStackListFrames(const GdbResponse &response)
|
|||||||
void GdbEngine::activateFrame(int frameIndex)
|
void GdbEngine::activateFrame(int frameIndex)
|
||||||
{
|
{
|
||||||
m_manager->resetLocation();
|
m_manager->resetLocation();
|
||||||
if (state() != InferiorStopped)
|
if (state() != InferiorStopped && state() != InferiorUnrunnable)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
StackHandler *stackHandler = manager()->stackHandler();
|
StackHandler *stackHandler = manager()->stackHandler();
|
||||||
|
|||||||
Reference in New Issue
Block a user