File tree Expand file tree Collapse file tree 3 files changed +32
-0
lines changed
test/API/commands/target/dump-separate-debug-info/dwo Expand file tree Collapse file tree 3 files changed +32
-0
lines changed Original file line number Diff line number Diff line change @@ -228,6 +228,11 @@ class SymbolFileOnDemand : public lldb_private::SymbolFile {
228
228
return m_sym_file_impl->SetDebugInfoHadFrameVariableErrors ();
229
229
}
230
230
231
+ bool GetSeparateDebugInfo (StructuredData::Dictionary &d,
232
+ bool errors_only) override {
233
+ return m_sym_file_impl->GetSeparateDebugInfo (d, errors_only);
234
+ }
235
+
231
236
lldb::TypeSP MakeType (lldb::user_id_t uid, ConstString name,
232
237
std::optional<uint64_t > byte_size,
233
238
SymbolContextScope *context,
Original file line number Diff line number Diff line change @@ -2691,6 +2691,7 @@ class CommandObjectTargetModulesDumpSeparateDebugInfoFiles
2691
2691
" Found unsupported debug info type '%s'.\n " ,
2692
2692
type.str ().c_str ());
2693
2693
}
2694
+ strm.EOL ();
2694
2695
return true ;
2695
2696
});
2696
2697
}
Original file line number Diff line number Diff line change @@ -130,3 +130,29 @@ def test_dwos_not_loaded_table_output(self):
130
130
"0x[a-zA-Z0-9]{16}\s+E\s+.*foo\.dwo" ,
131
131
],
132
132
)
133
+
134
+ @skipIfRemote
135
+ @skipIfDarwin
136
+ @skipIfWindows
137
+ def test_dwos_loaded_symbols_on_demand (self ):
138
+ self .build ()
139
+ exe = self .getBuildArtifact ("a.out" )
140
+ main_dwo = self .getBuildArtifact ("main.dwo" )
141
+ foo_dwo = self .getBuildArtifact ("foo.dwo" )
142
+
143
+ # Make sure dwo files exist
144
+ self .assertTrue (os .path .exists (main_dwo ), f'Make sure "{ main_dwo } " file exists' )
145
+ self .assertTrue (os .path .exists (foo_dwo ), f'Make sure "{ foo_dwo } " file exists' )
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
+ output = self .get_dwos_from_json_output ()
157
+ self .assertTrue (output [exe ]["main.dwo" ]["loaded" ])
158
+ self .assertTrue (output [exe ]["foo.dwo" ]["loaded" ])
You can’t perform that action at this time.
0 commit comments