[Lldb-commits] [PATCH] D32732: "target variable" not showing all global variable if we print any global variable before execution starts
Jim Ingham via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Thu May 4 11:37:49 PDT 2017
jingham added a comment.
Yes, I was printing a global variable that WASN'T defined in the source file I later stopped in. So it worked for me. The bug is really that looking up a variable by name goes through and adds only that variable to the CU that defines it, but the CU doesn't make note of the fact that it didn't actually fully populate the m_variables for the CU. So then later on when you ask for them, we think we got them all, which of course we haven't.
The fix needs to be in CompileUnit. It shouldn't use m_variables.get to tell itself that it has finished getting variables for the CU. It has to keep another flag telling itself that it has gotten ALL the variables defined in the comp unit, and if that's false, it should keep adding.
More information about the lldb-commits