Debugger: Don't quit on inferior-exited.

We might have "follow-fork-mode child" and it's only the parent exiting.
Instead quit when the last known thread is gone.

Change-Id: I77a017e6f57ae0ee383aabd2b6f0377ff8261d41
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
This commit is contained in:
hjk
2015-06-12 15:17:14 +02:00
parent f15d177ffd
commit 42be4ef64f
3 changed files with 38 additions and 12 deletions

View File

@@ -314,6 +314,16 @@ void ThreadsHandler::setCurrentThread(ThreadId id)
updateThreadBox();
}
QByteArray ThreadsHandler::pidForGroupId(const QByteArray &groupId) const
{
return m_pidForGroupId[groupId];
}
void ThreadsHandler::notifyGroupCreated(const QByteArray &groupId, const QByteArray &pid)
{
m_pidForGroupId[groupId] = pid;
}
void ThreadsHandler::updateThread(const ThreadData &threadData)
{
if (ThreadItem *item = itemForThreadId(this, threadData.id))
@@ -360,6 +370,20 @@ void ThreadsHandler::removeAll()
rootItem()->removeChildren();
}
bool ThreadsHandler::notifyGroupExited(const QByteArray &groupId)
{
QList<ThreadItem *> list;
auto items = itemsAtLevel<ThreadItem *>(1);
foreach (ThreadItem *item, items)
if (item->groupId == groupId)
list.append(item);
foreach (ThreadItem *item, list)
delete takeItem(item);
m_pidForGroupId.remove(groupId);
return m_pidForGroupId.isEmpty();
}
void ThreadsHandler::notifyRunning(const QByteArray &data)
{
if (data.isEmpty() || data == "all") {