Fix SBFrame::FindValue for when only global variables exist.
authorChaoren Lin <chaorenl@google.com>
Thu, 19 Mar 2015 22:00:13 +0000 (22:00 +0000)
committerChaoren Lin <chaorenl@google.com>
Thu, 19 Mar 2015 22:00:13 +0000 (22:00 +0000)
commit0efb51a072b06d5cfb97af6594c3a1fd0e80cc93
tree878d31ce1b80af68d6d2c8d873469756dd8df887
parenta7f8c46439ea05c6e64ba9c6f25d3261521a05d4
Fix SBFrame::FindValue for when only global variables exist.

Summary:
sc.block->AppendVariables(...) returns 0 if there are no arguments or local
variables, but we still need to check for global variables.

Test Plan:
```
$ cat test.cpp
int i;
int main() {
}
$ lldb test -o 'b main' -o r
(lldb) script
>>> print lldb.frame.FindValue('i', lldb.eValueTypeVariableGlobal)
(int) i = 0 # as opposed to "No value"
```

Reviewers: jingham, ovyalov, vharron, clayborg

Reviewed By: clayborg

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D8464

llvm-svn: 232767
lldb/source/API/SBFrame.cpp