[all-commits] [llvm/llvm-project] 21d09c: [lldb-vscode] Ensure that target matches the execu...
Tatyana Krasnukha via All-commits
all-commits at lists.llvm.org
Thu Feb 13 08:34:21 PST 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 21d09ccf268dc071d452b0207a3dd91228a51da3
https://github.com/llvm/llvm-project/commit/21d09ccf268dc071d452b0207a3dd91228a51da3
Author: Tatyana Krasnukha <tatyana at synopsys.com>
Date: 2020-02-13 (Thu, 13 Feb 2020)
Changed paths:
M lldb/tools/lldb-vscode/VSCode.cpp
M lldb/tools/lldb-vscode/VSCode.h
M lldb/tools/lldb-vscode/lldb-vscode.cpp
M lldb/tools/lldb-vscode/package.json
Log Message:
-----------
[lldb-vscode] Ensure that target matches the executable file
This commit fixes an issue with lldb-vscode failing to run programs that
use different architecture/platform than the "empty" in the target.
Original implementation was creating a default target without specifying
the target architecture, platform or program, and then would set
executable file through SBLaunchInfo, assuming that this would update
architecture and platform accordingly. However this wasn't really
happening, and architecture and platform would remain at whatever values
were in the "empty" target. The simple solution is to create target
already for a desired architecture and platform.
Function request_attach is updated in a similar fashion.
This commit also adds new JSON properties to "launch" and "attach"
packets to allow user to override desired platform and architecture.
This might be especially important for cases where information in ELF is
not enough to derive those values correctly.
New code has a behavior similar to LLDB MI [1], where typically IDE would
specify target file with -file-exec-and-symbols, and then only do -exec-run
command that would launch the process. In lldb-vscode those two actions are
merged into one request_launch function. Similarly in the interpreter
session, user would first do "file" command, then "process launch"
Differential Revision: https://reviews.llvm.org/D70847
Signed-off-by: Anton Kolesov <anton.kolesov at synopsys.com>
More information about the All-commits
mailing list