When looking for the start of an line, ignore if there's no debug info

* When searching for the start of a range of instructions mapped to a single
  line when stepping backwards, we need to ignore instructions that don't have
  any debug info because they will look like a 'different' smaller stack.
This commit is contained in:
baldurk
2022-09-13 15:34:39 +01:00
parent 3013be8d52
commit b49d7982d6
+2 -2
View File
@@ -2170,8 +2170,8 @@ bool ShaderViewer::step(bool forward, StepMode mode)
// keep going until we hit the closest instruction of any block that maps to this function
while(!IsFirstState() && !targetInsts.contains(GetCurrentState().nextInstruction))
{
if((oldStack == GetPreviousState().callstack ||
oldStack.size() > GetPreviousState().callstack.size()) &&
const rdcarray<rdcstr> &prevStack = GetPreviousState().callstack;
if((oldStack == prevStack || (!prevStack.empty() && oldStack.size() > prevStack.size())) &&
!oldLine.SourceEqual(GetPreviousInstInfo().lineInfo))
{
// if we hit this case, it means we jumped to an instruction in the same call which maps