File tree Expand file tree Collapse file tree 4 files changed +39
-2
lines changed
test/API/commands/frame/var-dil/basics/NoDebugInfo Expand file tree Collapse file tree 4 files changed +39
-2
lines changed Original file line number Diff line number Diff line change @@ -50,8 +50,9 @@ lldb::ValueObjectSP LookupGlobalIdentifier(
5050 // Get a global variables list without the locals from the current frame
5151 SymbolContext symbol_context =
5252 stack_frame->GetSymbolContext (lldb::eSymbolContextCompUnit);
53- lldb::VariableListSP variable_list =
54- symbol_context.comp_unit ->GetVariableList (true );
53+ lldb::VariableListSP variable_list;
54+ if (symbol_context.comp_unit )
55+ variable_list = symbol_context.comp_unit ->GetVariableList (true );
5556
5657 name_ref.consume_front (" ::" );
5758 lldb::ValueObjectSP value_sp;
Original file line number Diff line number Diff line change 1+ CXX_SOURCES := main.cpp
2+ CFLAGS_EXTRAS := -g0
3+
4+ include Makefile.rules
Original file line number Diff line number Diff line change 1+ """
2+ Test DIL without debug info.
3+ """
4+
5+ import lldb
6+ from lldbsuite .test .lldbtest import *
7+ from lldbsuite .test .decorators import *
8+ from lldbsuite .test import lldbutil
9+
10+
11+ class TestFrameVarDILNoDebugInfo (TestBase ):
12+ NO_DEBUG_INFO_TESTCASE = True
13+
14+ def test_no_debug_info (self ):
15+ self .build ()
16+ lldbutil .run_to_name_breakpoint (self , "main" )
17+
18+ self .runCmd ("settings set target.experimental.use-DIL true" )
19+
20+ self .expect (
21+ "frame var 'argc'" ,
22+ error = True ,
23+ substrs = ["use of undeclared identifier" ],
24+ )
25+ self .expect (
26+ "frame var 'foo'" ,
27+ error = True ,
28+ substrs = ["use of undeclared identifier" ],
29+ )
Original file line number Diff line number Diff line change 1+ int foo = 1 ;
2+
3+ int main (int argc, char **argv) { return foo; }
You can’t perform that action at this time.
0 commit comments