This is an archive of the discontinued LLVM Phabricator instance.

"target variable" not showing all global variable if we print any global variable before execution starts
AbandonedPublic

Authored by vbalu on Apr 24 2017, 12:13 AM.

Details

Reviewers
emaste
zturner
Summary

"target variable" at main not printing all the global variables if we have print ant global variable before starting execution. Instead it show only variables that we printed before starting execution.
It wont work on three scenarios.
case 1:

(lldb) print my_global_char                ==> global variable
(char) $0 = 'X'
(lldb) b main
(lldb) r 
(lldb) target variable
 Global variables for ******
 (char) my_global_char = 'X'               ==> not showing other global variables
 (lldb)

case 2:

(lldb) target variable -r my_global_ch*                ==> global variable
(char) $0 = 'X'
(lldb) b main
(lldb) r 
(lldb) target variable
 Global variables for ******
 (char) my_global_char = 'X'               ==> not showing other global variables
 (lldb)

case 3:

(lldb) target variable my_global_char               ==> global variable
(char) $0 = 'X'
(lldb) b main
(lldb) r 
(lldb) target variable
 Global variables for ******
 (char) my_global_char = 'X'               ==> not showing other global variables
 (lldb)

For all other scopes we parse all the variables before we look for the required variable, so it would be updated in m_varibles.
For global scope, we look for required variable and only that updated m_variables which taken back for "target variable"

Diff Detail

Repository
rL LLVM

Event Timeline

vbalu created this revision.Apr 24 2017, 12:13 AM
vbalu abandoned this revision.May 1 2017, 10:07 PM