diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2021-12-25 22:30:44 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2021-12-25 22:30:44 +0000 |
| commit | 77fc4c146f0870ffb09c1afb823ccbe742c5e6ff (patch) | |
| tree | 5c0eb39553003b9c75a901af6bc4ddabd6f2f28c /lldb/source/Target/Target.cpp | |
| parent | f65dcba83ce5035ab88a85fe17628b447eb56e1b (diff) | |
Diffstat (limited to 'lldb/source/Target/Target.cpp')
| -rw-r--r-- | lldb/source/Target/Target.cpp | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/lldb/source/Target/Target.cpp b/lldb/source/Target/Target.cpp index 28575b50cf96..fa860399aca7 100644 --- a/lldb/source/Target/Target.cpp +++ b/lldb/source/Target/Target.cpp @@ -616,12 +616,8 @@ lldb::BreakpointSP Target::CreateScriptedBreakpoint( shared_from_this()); } - StructuredDataImpl *extra_args_impl = new StructuredDataImpl(); - if (extra_args_sp) - extra_args_impl->SetObjectSP(extra_args_sp); - BreakpointResolverSP resolver_sp(new BreakpointResolverScripted( - nullptr, class_name, depth, extra_args_impl)); + nullptr, class_name, depth, StructuredDataImpl(extra_args_sp))); return CreateBreakpoint(filter_sp, resolver_sp, internal, false, true); } @@ -3321,8 +3317,7 @@ void Target::FinalizeFileActions(ProcessLaunchInfo &info) { err_file_spec); } - if (default_to_use_pty && - (!in_file_spec || !out_file_spec || !err_file_spec)) { + if (default_to_use_pty) { llvm::Error Err = info.SetUpPtyRedirection(); LLDB_LOG_ERROR(log, std::move(Err), "SetUpPtyRedirection failed: {0}"); } @@ -3485,11 +3480,7 @@ Status Target::StopHookScripted::SetScriptCallback( } m_class_name = class_name; - - m_extra_args = new StructuredDataImpl(); - - if (extra_args_sp) - m_extra_args->SetObjectSP(extra_args_sp); + m_extra_args.SetObjectSP(extra_args_sp); m_implementation_sp = script_interp->CreateScriptedStopHook( GetTarget(), m_class_name.c_str(), m_extra_args, error); @@ -3527,9 +3518,9 @@ void Target::StopHookScripted::GetSubclassDescription( // Now print the extra args: // FIXME: We should use StructuredData.GetDescription on the m_extra_args // but that seems to rely on some printing plugin that doesn't exist. - if (!m_extra_args->IsValid()) + if (!m_extra_args.IsValid()) return; - StructuredData::ObjectSP object_sp = m_extra_args->GetObjectSP(); + StructuredData::ObjectSP object_sp = m_extra_args.GetObjectSP(); if (!object_sp || !object_sp->IsValid()) return; |
