[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
Mon May 1 22:04:53 PDT 2017


vbalu created this revision.

"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"


Repository:
  rL LLVM

https://reviews.llvm.org/D32732

Files:
  source/Commands/CommandObjectTarget.cpp
  source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp
  source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D32732.97388.patch
Type: text/x-patch
Size: 3991 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20170502/ac9ad4e8/attachment-0001.bin>


More information about the lldb-commits mailing list