File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed
lldb/test/API/commands/dwim-print Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ def _run_cmd(self, cmd: str) -> str:
1616 self .ci .HandleCommand (cmd , result )
1717 return result .GetOutput ().rstrip ()
1818
19- VAR_IDENT = re .compile (r"(?:\$\d+|[\w.]+) = " )
19+ VAR_IDENT = re .compile (r"(?:\$\d+|(?:::)? [\w.]+) = " )
2020
2121 def _strip_result_var (self , string : str ) -> str :
2222 """
@@ -185,3 +185,11 @@ def test_direct_child_access(self):
185185 self , "break inside" , lldb .SBFileSpec ("main.cpp" )
186186 )
187187 self ._expect_cmd ("dwim-print number" , "frame variable" )
188+
189+ def test_global_variables (self ):
190+ """Test dwim-print supports global variables."""
191+ self .build ()
192+ lldbutil .run_to_source_breakpoint (
193+ self , "break here" , lldb .SBFileSpec ("main.cpp" )
194+ )
195+ self ._expect_cmd ("dwim-print gGlobal" , "frame variable" )
Original file line number Diff line number Diff line change 11extern " C" int puts (const char *s);
22
3+ extern int gGlobal ;
4+ int gGlobal = 23 ;
5+
36struct Structure {
47 int number = 30 ;
58 void f () { puts (" break inside" ); }
You can’t perform that action at this time.
0 commit comments