[Bug 27416] New: missing global variables

Bug ID 27416
Summary missing global variables
Product lldb
Version unspecified
Hardware PC
OS All
Status NEW
Severity normal
Priority P
Component All Bugs
Assignee lldb-dev@lists.llvm.org
Reporter ribrdb@google.com
CC llvm-bugs@lists.llvm.org
Classification Unclassified

If you look up one or more globals using FindGlobalVariables, a later call to
sc.comp_unit->GetVariableList() only contains the previously found globals

$ cat /tmp/test.c
int a = 0;
int b = 1;
int c = 2;

int main() {
  return 0;
}
$ lldb /tmp/test
(lldb) b main
(lldb) r
(lldb) target variable c
(int) c = 2
(lldb) target variable
Global variables for /tmp/test.c in /tmp/test:
(int) c = 2

This should show all 3 globals, just like if you run "target variable" first:
$ lldb /tmp/test
(lldb) b main
(lldb) r
(lldb) target variable
Global variables for /tmp/test.c in /tmp/test:
(int) c = 2
(int) a = 0
(int) b = 1

Marius Trandafir changed bug 27416

Marius Trandafir changed bug 27416