[all-commits] [llvm/llvm-project] 141867: Fix SBValue::FindValue for file static variables
jimingham via All-commits
all-commits at lists.llvm.org
Tue May 30 17:13:51 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 14186773e79b8c6787afac2f9ee69738151377ec
https://github.com/llvm/llvm-project/commit/14186773e79b8c6787afac2f9ee69738151377ec
Author: Jim Ingham <jingham at apple.com>
Date: 2023-05-30 (Tue, 30 May 2023)
Changed paths:
M lldb/source/API/SBFrame.cpp
M lldb/test/API/python_api/process/TestProcessAPI.py
M lldb/test/API/python_api/process/main.cpp
Log Message:
-----------
Fix SBValue::FindValue for file static variables
This was just a thinko. The API StackFrame::GetVariableList takes a
bool for "get_file_globals" which if true will also find file statics
and file globals. But we only were passing that as true if the
ValueType was eValueTypeVariableGlobal, which meant that we never find
file statics. It's okay if we cast too wide a net when we do
GetVariableList as later on we check against the ValueType to filter
globals from statics.
There was a test that had a whole bunch of globals and tested
FindValue on all of them, but had no statics. So I just made one of
the globals a file static, which verifies the fix.
Differential Revision: https://reviews.llvm.org/D151392
More information about the All-commits
mailing list