MCPcopy Create free account
hub / github.com/KDE/kdevelop / setCurrentPositionToFrameFieldOf

Method setCurrentPositionToFrameFieldOf

plugins/debuggercommon/midebugsession.cpp:989–999  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

987}
988
989void MIDebugSession::setCurrentPositionToFrameFieldOf(const TupleRecord& record)
990{
991 const auto& frame = record[QStringLiteral("frame")];
992 const auto file = literalIfHasField(frame, QStringLiteral("fullname"));
993 const auto line = literalIfHasField(frame, QStringLiteral("line"));
994 const auto addr = literalIfHasField(frame, QStringLiteral("addr"));
995
996 // An MI line is one-based and IDebugSession::currentLine() is zero-based. If line is an empty string,
997 // the value -1 that means "invalid, missing or unknown line number" is passed to setCurrentPosition().
998 setCurrentPosition(QUrl::fromLocalFile(file), line.toInt() - 1, addr);
999}
1000
1001void MIDebugSession::handleStackInfoFrame(const ResultRecord& result)
1002{

Callers

nothing calls this directly

Calls 2

literalIfHasFieldFunction · 0.85
toIntMethod · 0.80

Tested by

no test coverage detected