File tree Expand file tree Collapse file tree 1 file changed +30
-0
lines changed
lldb/test/API/commands/target/dump-separate-debug-info/oso Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -126,3 +126,33 @@ def test_shows_oso_not_loaded_table_output(self):
126
126
"0x[a-zA-Z0-9]{16}\s+E\s+.*foo\.o" ,
127
127
],
128
128
)
129
+
130
+ @skipIfRemote
131
+ @skipUnlessDarwin
132
+ def test_osos_loaded_symbols_on_demand (self ):
133
+ self .build (debug_info = "dwarf" )
134
+ exe = self .getBuildArtifact ("a.out" )
135
+ main_o = self .getBuildArtifact ("main.o" )
136
+ foo_o = self .getBuildArtifact ("foo.o" )
137
+
138
+ # Make sure o files exist
139
+ self .assertTrue (os .path .exists (main_o ), f'Make sure "{ main_o } " file exists' )
140
+ self .assertTrue (os .path .exists (foo_o ), f'Make sure "{ foo_o } " file exists' )
141
+
142
+ target = self .dbg .CreateTarget (exe )
143
+ self .assertTrue (target , lldbtest .VALID_TARGET )
144
+
145
+ self .runCmd ("target modules dump separate-debug-info --json" )
146
+
147
+ # Load symbols on-demand
148
+ self .runCmd ("settings set symbols.load-on-demand true" )
149
+
150
+ target = self .dbg .CreateTarget (exe )
151
+ self .assertTrue (target , lldbtest .VALID_TARGET )
152
+
153
+ self .runCmd ("target modules dump separate-debug-info --json" )
154
+
155
+ # Check the output
156
+ osos = self .get_osos_from_json_output ()
157
+ self .assertTrue (osos [exe ][main_o ]["loaded" ])
158
+ self .assertTrue (osos [exe ][foo_o ]["loaded" ])
You can’t perform that action at this time.
0 commit comments