File tree Expand file tree Collapse file tree 3 files changed +11
-4
lines changed
packages/Python/lldbsuite/test Expand file tree Collapse file tree 3 files changed +11
-4
lines changed Original file line number Diff line number Diff line change 5252python = sys .executable
5353
5454# The overriden dwarf verison.
55+ # Don't use this to test the current compiler's
56+ # DWARF version, as this won't be set if the
57+ # version isn't overridden.
58+ # Use lldbplatformutils.getDwarfVersion() instead.
5559dwarf_version = 0
5660
5761# Any overridden settings.
Original file line number Diff line number Diff line change 88from lldbsuite .test .decorators import *
99from lldbsuite .test .lldbtest import *
1010from lldbsuite .test import lldbutil
11-
11+ from lldbsuite . test import lldbplatformutil
1212
1313class NamespaceLookupTestCase (TestBase ):
1414 def setUp (self ):
@@ -167,7 +167,10 @@ def test_scope_lookup_with_run_command(self):
167167 self .runToBkpt ("continue" )
168168 # FIXME: In DWARF 5 with dsyms, the ordering of functions is slightly
169169 # different, which also hits the same issues mentioned previously.
170- if configuration .dwarf_version <= 4 or self .getDebugInfo () == "dwarf" :
170+ if (
171+ int (lldbplatformutil .getDwarfVersion ()) <= 4
172+ or self .getDebugInfo () == "dwarf"
173+ ):
171174 self .expect_expr ("func()" , result_type = "int" , result_value = "2" )
172175
173176 # Continue to BP_ns_scope at ns scope
Original file line number Diff line number Diff line change 66from lldbsuite .test .decorators import *
77from lldbsuite .test .lldbtest import *
88from lldbsuite .test import lldbutil
9-
9+ from lldbsuite . test import lldbplatformutil
1010
1111class TypeAndTypeListTestCase (TestBase ):
1212 def setUp (self ):
@@ -248,7 +248,7 @@ def test(self):
248248 self .assertEqual (myint_arr_element_type , myint_type )
249249
250250 # Test enum methods. Requires DW_AT_enum_class which was added in Dwarf 4.
251- if configuration . dwarf_version >= 4 :
251+ if int ( lldbplatformutil . getDwarfVersion ()) >= 4 :
252252 enum_type = target .FindFirstType ("EnumType" )
253253 self .assertTrue (enum_type )
254254 self .DebugSBType (enum_type )
You can’t perform that action at this time.
0 commit comments