| 142 | return m_compiler->GetLocals(curFunc); |
| 143 | } |
| 144 | bv_variable* ShaderDebugger::GetLocalValue(const std::string& varname) |
| 145 | { |
| 146 | bv_scope* scope = m_stepper->scope; |
| 147 | std::string curFunc = GetCurrentFunction(); |
| 148 | const auto& locList = m_compiler->GetLocals(curFunc); |
| 149 | auto argList = m_getFunctionInfo(GetCurrentFunction()).Arguments; |
| 150 | |
| 151 | for (u32 i = 0; i < argList.size(); i++) |
| 152 | if (argList[i].Name == varname) { |
| 153 | u32 index = bv_scope_get_locals_start(scope) + i; |
| 154 | |
| 155 | if (index >= scope->locals.length) |
| 156 | return nullptr; |
| 157 | |
| 158 | return &scope->locals.data[index]; |
| 159 | } |
| 160 | |
| 161 | for (u32 i = 0; i < locList.size(); i++) |
| 162 | if (locList[i] == varname) { |
| 163 | u32 index = bv_scope_get_locals_start(scope)+i+argList.size(); |
| 164 | |
| 165 | if (index >= scope->locals.length) |
| 166 | return nullptr; |
| 167 | |
| 168 | return &scope->locals.data[index]; |
| 169 | } |
| 170 | return nullptr; |
| 171 | } |
| 172 | void ShaderDebugger::Jump(int line) |
| 173 | { |
| 174 | while (Step()) { |