summaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
diff options
context:
space:
mode:
authorVladislav Dzhidzhoev <vdzhidzhoev@accesssoftek.com>2025-04-18 13:57:28 +0200
committerGitHub <noreply@github.com>2025-04-18 13:57:28 +0200
commit6462fad3d04d1cc6ceda303a6525742c8b911e79 (patch)
tree450bd949c0149766e7714d7e91d25779fcd00dd4 /lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
parentc890b7376fc916c1818dc3c211a080601973aa0b (diff)
[DebugInfo] getMergedLocation: match scopes based on their location (#132286)
getMergedLocation uses a common parent scope of the two input locations for an output location. It doesn't consider the case when the common parent scope is from a file other than L1's and L2's files. In that case, it produces a merged location with an erroneous scope (https://github.com/llvm/llvm-project/issues/122846). In some cases, such as https://github.com/llvm/llvm-project/pull/125780#issuecomment-2651657856, L1, L2 having a common parent scope from another file indicate that the code at L1 and L2 is included from the same source location. With this commit, getMergedLocation detects that L1, L2, or their common parent scope files are different. If so, it assumes that L1 and L2 were included from some source location, and tries to attach the output location to a scope with the nearest common source location with regard to L1 and L2. If the nearest common location is also from another file, getMergedLocation returns it as a merged location, assuming that L1 and L2 belong to files that were both included in the nearest common location. Fixes https://github.com/llvm/llvm-project/issues/122846.
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp')
0 files changed, 0 insertions, 0 deletions