@@ -540,11 +540,11 @@ def test_non_split_dwarf_has_no_dwo_files(self):
540
540
debug_stats = self .get_stats ()
541
541
self .assertIn ("totalDwoFileCount" , debug_stats )
542
542
self .assertIn ("totalLoadedDwoFileCount" , debug_stats )
543
-
543
+
544
544
# Verify that the dwo file count is zero
545
545
self .assertEqual (debug_stats ["totalDwoFileCount" ], 0 )
546
546
self .assertEqual (debug_stats ["totalLoadedDwoFileCount" ], 0 )
547
-
547
+
548
548
@add_test_categories (["dwo" ])
549
549
def test_no_debug_names_eager_loads_dwo_files (self ):
550
550
"""
@@ -554,7 +554,7 @@ def test_no_debug_names_eager_loads_dwo_files(self):
554
554
- With debug_names: DebugNamesDWARFIndex allows for lazy loading.
555
555
DWO files are loaded on-demand when symbols are actually looked up
556
556
- Without debug_names: ManualDWARFIndex uses eager loading.
557
- All DWO files are loaded upfront during the first symbol lookup to build a manual index.
557
+ All DWO files are loaded upfront during the first symbol lookup to build a manual index.
558
558
"""
559
559
da = {"CXX_SOURCES" : "third.cpp baz.cpp" , "EXE" : self .getBuildArtifact ("a.out" )}
560
560
self .build (dictionary = da , debug_info = ["dwo" ])
@@ -564,7 +564,7 @@ def test_no_debug_names_eager_loads_dwo_files(self):
564
564
debug_stats = self .get_stats ()
565
565
self .assertIn ("totalDwoFileCount" , debug_stats )
566
566
self .assertIn ("totalLoadedDwoFileCount" , debug_stats )
567
-
567
+
568
568
# Verify that all DWO files are loaded
569
569
self .assertEqual (debug_stats ["totalDwoFileCount" ], 2 )
570
570
self .assertEqual (debug_stats ["totalLoadedDwoFileCount" ], 2 )
@@ -594,13 +594,13 @@ def test_split_dwarf_dwo_file_count(self):
594
594
self .assertIn ("totalDwoFileCount" , debug_stats )
595
595
self .assertEqual (debug_stats ["totalLoadedDwoFileCount" ], 0 )
596
596
self .assertEqual (debug_stats ["totalDwoFileCount" ], 2 )
597
-
597
+
598
598
# Since there's only one module, module stats should have the same counts as total counts
599
599
self .assertIn ("dwoFileCount" , debug_stats ["modules" ][0 ])
600
600
self .assertIn ("loadedDwoFileCount" , debug_stats ["modules" ][0 ])
601
601
self .assertEqual (debug_stats ["modules" ][0 ]["loadedDwoFileCount" ], 0 )
602
602
self .assertEqual (debug_stats ["modules" ][0 ]["dwoFileCount" ], 2 )
603
-
603
+
604
604
# 2) Setting breakpoint in main triggers loading of third.dwo (contains main function)
605
605
self .runCmd ("b main" )
606
606
debug_stats = self .get_stats ()
@@ -609,7 +609,7 @@ def test_split_dwarf_dwo_file_count(self):
609
609
610
610
self .assertEqual (debug_stats ["modules" ][0 ]["loadedDwoFileCount" ], 1 )
611
611
self .assertEqual (debug_stats ["modules" ][0 ]["dwoFileCount" ], 2 )
612
-
612
+
613
613
# 3) Type lookup forces loading of baz.dwo (contains struct Baz definition)
614
614
self .runCmd ("type lookup Baz" )
615
615
debug_stats = self .get_stats ()
@@ -618,7 +618,7 @@ def test_split_dwarf_dwo_file_count(self):
618
618
619
619
self .assertEqual (debug_stats ["modules" ][0 ]["loadedDwoFileCount" ], 2 )
620
620
self .assertEqual (debug_stats ["modules" ][0 ]["dwoFileCount" ], 2 )
621
-
621
+
622
622
@add_test_categories (["dwo" ])
623
623
def test_dwp_dwo_file_count (self ):
624
624
"""
@@ -627,7 +627,7 @@ def test_dwp_dwo_file_count(self):
627
627
verifies the loaded dwo file count is the expected count after running
628
628
various commands.
629
629
630
- We expect the DWO file counters to reflect the number of compile units
630
+ We expect the DWO file counters to reflect the number of compile units
631
631
loaded from the DWP file (each representing what was originally a separate DWO file)
632
632
"""
633
633
da = {"CXX_SOURCES" : "third.cpp baz.cpp" , "EXE" : self .getBuildArtifact ("a.out" )}
@@ -642,19 +642,18 @@ def test_dwp_dwo_file_count(self):
642
642
self .assertIn ("totalDwoFileCount" , debug_stats )
643
643
self .assertEqual (debug_stats ["totalLoadedDwoFileCount" ], 0 )
644
644
self .assertEqual (debug_stats ["totalDwoFileCount" ], 2 )
645
-
645
+
646
646
# Setting breakpoint in main triggers parsing of the CU within a.dwp corresponding to third.dwo (contains main function)
647
647
self .runCmd ("b main" )
648
648
debug_stats = self .get_stats ()
649
649
self .assertEqual (debug_stats ["totalLoadedDwoFileCount" ], 1 )
650
650
self .assertEqual (debug_stats ["totalDwoFileCount" ], 2 )
651
-
651
+
652
652
# Type lookup forces parsing of the CU within a.dwp corresponding to baz.dwo (contains struct Baz definition)
653
653
self .runCmd ("type lookup Baz" )
654
654
debug_stats = self .get_stats ()
655
655
self .assertEqual (debug_stats ["totalDwoFileCount" ], 2 )
656
656
self .assertEqual (debug_stats ["totalLoadedDwoFileCount" ], 2 )
657
-
658
657
659
658
@skipUnlessDarwin
660
659
@no_debug_info_test
0 commit comments