Ignore source variables making later than the current instruction

This commit is contained in:
Jake Turner
2024-12-18 11:12:40 +00:00
parent de70f5b4b2
commit f6829299ba
@@ -6621,6 +6621,9 @@ void Debugger::ParseDebugData()
{
const LocalMapping &mapping = s->localMappings[m];
if(mapping.instIndex > instructionIndex)
continue;
// see if this mapping is superceded by a later mapping in this scope for this
// instruction. This is a bit inefficient but simple. The alternative would be to do
// record start and end points for each mapping and update the end points, but this is
@@ -6633,6 +6636,9 @@ void Debugger::ParseDebugData()
{
const LocalMapping &laterMapping = s->localMappings[n];
if(laterMapping.instIndex > instructionIndex)
continue;
// if this mapping will supercede and starts later
if(laterMapping.isSourceSupersetOf(mapping) &&
laterMapping.instIndex > mapping.instIndex)