[Lldb-commits] [PATCH] D32732: "target variable" not showing all global variable if we print any global variable before execution starts

vignesh balu via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue May 16 00:21:23 PDT 2017


vbalu added a comment.

In https://reviews.llvm.org/D32732#753348, @jingham wrote:

> That looks like the right way to do it.  What was your thinking behind returning null rather than the partial list of variables already parsed if can_create is false?  That doesn't seem like what somebody who is bothering to pass in can_create false intends.


The issue is use of m_variables when it is partially Parsed. when a function looking of a global variable count it just call the GetVariableList with "can_create=false" which will return the partially parsed m_variabe leads to wrong count.
"can_create" avoid the recursion while parsing the variables and to get the parsed global variable list to the callee. So i thought returning NULL should be wise instead of sending partially parsed list.


Repository:
  rL LLVM

https://reviews.llvm.org/D32732





More information about the lldb-commits mailing list