diff options
author | David Spickett <david.spickett@linaro.org> | 2023-06-28 08:01:14 +0000 |
---|---|---|
committer | David Spickett <david.spickett@linaro.org> | 2023-06-29 08:21:42 +0000 |
commit | 728101f97286c1665814e74686c083a4d5ff208c (patch) | |
tree | 5737ecf206a574e604a0f9307a19bf545f14058d /lldb/source/Commands/CommandObjectPlatform.cpp | |
parent | b24b6c4a32e159ece79583b3aaf5887ea44c4ebf (diff) | |
download | llvm-728101f97286c1665814e74686c083a4d5ff208c.zip llvm-728101f97286c1665814e74686c083a4d5ff208c.tar.gz llvm-728101f97286c1665814e74686c083a4d5ff208c.tar.bz2 |
Reland "[LLDB] Fix the use of "platform process launch" with no extra arguments"
This reverts commit 3254623d73fb7252385817d8057640c9d5d5ffd1.
One test has been updated to add the "-s" flag which along with
86fd957af981f146a306831608d7ad2de65b9560 should fix the tests on MacOS.
An assert on hijack listener added in that patch was removed, it seems
to be correct on MacOS but not on Linux.
Diffstat (limited to 'lldb/source/Commands/CommandObjectPlatform.cpp')
-rw-r--r-- | lldb/source/Commands/CommandObjectPlatform.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lldb/source/Commands/CommandObjectPlatform.cpp b/lldb/source/Commands/CommandObjectPlatform.cpp index e44a897..54115b5 100644 --- a/lldb/source/Commands/CommandObjectPlatform.cpp +++ b/lldb/source/Commands/CommandObjectPlatform.cpp @@ -1208,8 +1208,12 @@ protected: if (m_options.launch_info.GetExecutableFile()) { Debugger &debugger = GetDebugger(); - if (argc == 0) - target->GetRunArguments(m_options.launch_info.GetArguments()); + if (argc == 0) { + // If no arguments were given to the command, use target.run-args. + Args target_run_args; + target->GetRunArguments(target_run_args); + m_options.launch_info.GetArguments().AppendArguments(target_run_args); + } ProcessSP process_sp(platform_sp->DebugProcess( m_options.launch_info, debugger, *target, error)); @@ -1229,8 +1233,6 @@ protected: !synchronous_execution && launch_info.GetFlags().Test(eLaunchFlagStopAtEntry); - assert(launch_info.GetHijackListener()); - EventSP first_stop_event_sp; StateType state = process_sp->WaitForProcessToStop( std::nullopt, &first_stop_event_sp, rebroadcast_first_stop, |