[lldb-dev] lldb-vscode plugin information for Windows/Arm platform
Ted Woodward via lldb-dev
lldb-dev at lists.llvm.org
Fri Jan 21 08:30:29 PST 2022
The last 2 Hexagon release trains have shipped with vscode support on Linux and Windows. I worked with Greg to do what you want to do – make a vscode extension to allow it to use lldb-vscode as its debugger.
I wrote a batch script that:
* Removes the extension directory
* Creates the extension directory (%USERPROFILE%\.vscode\extensions\qualcomm-hexagon.lldb-vscode-8.5)
* Copies package.json to the extension directory
* Copies a dragon image I made (based on one from the llvm site) to <extension>\images
* Uses mklink /j to link the bin and lib directories from my toolset installation
The internal name of the extension defaults to lldb-vscode. I change this to include our release number, since it’s valid to have multiple toolset installations that are installed where the user wants, and we don’t want 8.5 to conflict with 8.6, etc.
Because it’s valid to install multiple releases, I link to the bin and lib directories for this extension’s installation. This also lets me have release and debug extensions – copy the release extension, change the internal plugin name in package.json, and point the links to my bin and lib directories. Then I can change the plugin name in my testcase’s tasks.json to point to my debug or release extension.
If you have any questions, please feel free to contact me.
On Jan 20, 2022, at 4:40 PM, Omair Javaid <omair.javaid at linaro.org<mailto:omair.javaid at linaro.org>> wrote:
Hi Greg,
I intend to understand requirements to set up the lldb-vscode tool for Windows on Arm. I have been looking at your vscode readme from https://github.com/llvm/llvm-project/blob/cfae2c65dbbe1a252958b4db2e32574e8e8dcec0/lldb/tools/lldb-vscode/README.md
If I understood correctly Windows on Arm platform is missing a vscode adapter plugin required to make lldb-vscode tool work on Arm/Windows platform. Similar adapter plugin is available for Windows x64 through third parties but I am wondering if there is an official version of the same plugin which can be packaged after porting for Windows on Arm.
Right now we don’t distribute a lldb-vscode through the marketplace so you just need to build it yourself and then create the directory as mentioned in the readme.
Basically you just need to download the LLDB sources to a Windows on Arm machine and build “lldb-vscode”. Then you take the “lldb-vscode.exe” binary and the LLDB DLL and put then into the extension’s bin folder. Then make sure that you can launch the program from the terminal and make sure it finds the DLL right next to the program
I am not sure if where the VSCode extensions live on a windows user folder, but the readme is saying:
~/.vscode/extensions/llvm-org.lldb-vscode-0.1.0/bin
So you would want to end up with:
~/.vscode/extensions/llvm-org.lldb-vscode-0.1.0/bin/lldb-vscode.exe
~/.vscode/extensions/llvm-org.lldb-vscode-0.1.0/bin/lldb.dll
(not sure of the name of the lldb library name on windows)
And then copy the package.json to the folder:
cp package.json ~/.vscode/extensions/llvm-org.lldb-vscode-0.1.0
Then you should be able to restart your VS code IDE and the extension should be available. It is important to make sure that the program lauches from the command line to make sure that the program is able to locate the lldb shared library (DLL). If you launch the program and it doesn’t complain, it will just sit there waiting for input. If it can’t find the DLL, then it should cause an error and you will need to figure where the DLL needs to be relative to the program. I am not familiar with exactly how this works on windows for a given EXE and how it locates the DLLs the main executable needs.
Let me know if you are able to get things working!
Greg
I ll really appreciate any sort of help/pointer to accelerate further progress.
Thanks!
--
Omair Javaid
www.linaro.org<http://www.linaro.org/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20220121/b0fea2e4/attachment-0001.html>
More information about the lldb-dev
mailing list