[lldb-vscode] Fix coredump load source mapping for first file
authorTed Woodward <tedwood@quicinc.com>
Mon, 1 Nov 2021 15:42:44 +0000 (10:42 -0500)
committerTed Woodward <tedwood@quicinc.com>
Mon, 1 Nov 2021 15:47:42 +0000 (10:47 -0500)
commit1c05c52de2177a328b7d2d07b697af67eb9f8122
tree221d8e15ec0ede6661747b2f89d0826778765691
parent42c94bc1abd1029c35846fd500a8b2bb008fef73
[lldb-vscode] Fix coredump load source mapping for first file

SetSourceMapFromArguments is called after the core is loaded. This means
that the source file for the crashing code won't have the source map applied.
Move the call to SetSourceMapFromArguments in request_attach to just after
the call to RunInitCommands, matching request_launch behavior.

Reviewed By: clayborg, wallace

Differential Revision: https://reviews.llvm.org/D112834
lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/lldbvscode_testcase.py
lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/vscode.py
lldb/test/API/tools/lldb-vscode/coreFile/TestVSCode_coreFile.py
lldb/test/API/tools/lldb-vscode/coreFile/main.c [new file with mode: 0644]
lldb/tools/lldb-vscode/lldb-vscode.cpp