mirror of
https://github.com/intel/llvm.git
synced 2026-01-21 20:53:29 +08:00
ProcessLaunchInfo: remove Debugger reference
Summary: The Debuffer object was being used in "GetListenerForProcess" to provide a default listener object if one was not specified in the launch_info object. Since all the callers of this function immediately passed the result to Target::CreateProcess, it was easy to move this logic there instead. This brings us one step closer towards being able to move the LaunchInfo classes to the Host layer (which is there the launching code that consumes them lives). Reviewers: zturner, jingham, teemperor Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D56174 llvm-svn: 350510
This commit is contained in:
@@ -194,6 +194,8 @@ void Target::DeleteCurrentProcess() {
|
||||
const lldb::ProcessSP &Target::CreateProcess(ListenerSP listener_sp,
|
||||
llvm::StringRef plugin_name,
|
||||
const FileSpec *crash_file) {
|
||||
if (!listener_sp)
|
||||
listener_sp = GetDebugger().GetListener();
|
||||
DeleteCurrentProcess();
|
||||
m_process_sp = Process::FindPlugin(shared_from_this(), plugin_name,
|
||||
listener_sp, crash_file);
|
||||
@@ -2884,8 +2886,7 @@ Status Target::Launch(ProcessLaunchInfo &launch_info, Stream *stream) {
|
||||
} else {
|
||||
// Use a Process plugin to construct the process.
|
||||
const char *plugin_name = launch_info.GetProcessPluginName();
|
||||
CreateProcess(launch_info.GetListenerForProcess(debugger), plugin_name,
|
||||
nullptr);
|
||||
CreateProcess(launch_info.GetListener(), plugin_name, nullptr);
|
||||
}
|
||||
|
||||
// Since we didn't have a platform launch the process, launch it here.
|
||||
|
||||
Reference in New Issue
Block a user