QML Debugger: Resolve breakpoints on non-executable lines
A breakpoint on a comment or blank line was never hit, as breakpoints
are matched exactly against the line of each executed statement. The
V8 based engine used to move them, but fa59f1e675 switched that off in
2011 because V8, compiling lazily, moved them to unexpected lines. The
V4 debugger never brought it back, and the two tests for it have been
QEXPECT_FAIL'd since.
Move such a breakpoint to the first line with code at or after it, as
found in the line tables of the compiled unit, so it cannot jump the
way it did with V8. It is not moved into a function or binding that
starts later (in QML the line may be an id or a literal binding, and
the next binding runs at an unrelated time), nor into a same-named file
that does not match the client's full path, such as the Button.qml of
a style. The hit is reported with the original breakpoint id, so the
client can move its marker.
The cached line tables hold a reference to their compilation unit, so
that a new unit at a freed address cannot inherit stale lines. They
are dropped once their file has no breakpoints, which lets the type
loader trim the unit again.
Task-number: QTCREATORBUG-34611
Assisted-by: Claude Code
Change-Id: I1430bacf6770dbb2401af31a593092369d64d02d
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>