[Lldb-commits] [PATCH] D153636: [LLDB] Fix the use of "platform process launch" with no extra arguments
David Spickett via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Fri Jun 23 08:13:47 PDT 2023
DavidSpickett created this revision.
Herald added a subscriber: kristof.beyls.
Herald added a project: All.
DavidSpickett requested review of this revision.
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.
This fixes #62068.
After 8d1de7b34af46a089eb5433c700419ad9b2923ee <https://reviews.llvm.org/rG8d1de7b34af46a089eb5433c700419ad9b2923ee> the following issue appeared:
$ ./bin/lldb /tmp/test.o
(lldb) target create "/tmp/test.o"
Current executable set to '/tmp/test.o' (aarch64).
(lldb) platform process launch -s
error: Cannot launch '': Nothing to launch
Previously would call target->GetRunArguments when there were no extra
arguments, so we could find out what target.run-args might be.
Once that change started relying on the first arg being the exe,
the fact that that call clears the existing argument list caused the bug.
Instead, have it set a local arg list and append that to the existing
one. Which in this case will just contain the exe name.
Since there's no existing tests for this command I've added a new file
that covers enough to check this issue.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D153636
Files:
lldb/source/Commands/CommandObjectPlatform.cpp
lldb/test/API/commands/platform/process/launch/Makefile
lldb/test/API/commands/platform/process/launch/TestPlatformProcessLaunch.py
lldb/test/API/commands/platform/process/launch/main.c
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D153636.533972.patch
Type: text/x-patch
Size: 3818 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20230623/86fa4aef/attachment.bin>
More information about the lldb-commits
mailing list