-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Path issue to open disassembly file even after correct configuration #8
Comments
Hi, At first, I'm sorry for a too-late reply. I've tried exact the same configuration with the same directory layout as yours, but it seems to work well. Maybe there are some other details which can help me to reproduce this behavior? |
Hello, No worries, it's never too late :) Actually, I tried again just now with the very same setup and things went just fine to access the assembly file. But, when I tried to slightly change the source code, the assembly file did not get updated. The tree structure I presented at first is the common structure for all my small projects, which are all located in a C++ folder, located in my current workspace. I am adding a screenshot of my screen, showing the source code, the project tree structure, the disassembly shown file and the actual .s file that I would like to have a view on. Remark that the add statement does not add the proper offset (1 instead of 5) due to a previous implementation of AddOneTo that used to add one. The file on the very right in the actual AddOneTo.s file I am trying to hgave the disassembly to use. Hope this helps. |
Looks very similar to #6. It seems that fixing that issue will resolve this too. |
Indeed, I subscribed to this issue to keep posted and will wait for this fix to test if I still get the issue. |
I have the same problem, can't find a workaround though. |
It seems I can only get it to work with absolute paths. |
Hi lineRe = /(\/[^:]+):(\d+).*/; // Before
lineRe = /([A-Za-z\/\.][:]*[^:]+):(\d+).*/; // After With this new regexp, you catch a path with disk name, dot or slash at start. And when parsing your document, in Windows, it can be in CRLF format. When processing binary (in const asmLines = asmResult.split('\n'); // Before
//
const asmLines = asmResult.split('\n').map(str => {
return str.trimRight();
}); // After Regards. |
Hello, Anyway, thanks for your contribution :) |
I tried using this extension again, and damn it's frustrating, because it looks cool, could be so useful and is sooo close to working oob with CMake. A lot of people here have problems using this with CMake and using compile_command.json might help, as the current "settings.json" options are not enough. This might solve this issue, #13, #20 and get you half-way to #28. The format of entries in build/compile_command.json is:
This gives us:
That information can easily be parsed to auto-generate the .s file name and also run compilation. Build directory and file being compiled are universal information. The rest will depend on the compiler, but most compilers use "-o" for the output file and you can also combine this with the file name. MSVC is special, but making a pretty universal regexp should be easy. A switch to enable this could be "disasexpl.use_compile_command_json: true", or to check if the project contains a CMakeLists.txt, or if the "C_Cpp.default.configurationProvider" in settings.json contains "cmake". I'd love to hear what you say about this. I'd love to help, but I've got a few projects already and no idea whatsoever of VSC extension development. If you need beta-testing or a CMake example-project I can help out. |
Hello,
First of all, thanks for the work on this plugin, this is very helpful to me :)
I am trying to configure the plugin to find disassembly file for any source code and I stumbled on what I think is an issue in the path management of the disassembly files.
Here is my project tree structure :
And here is my current setup in the workspace settings.json file :
Consequently, I would expect the main.s file to be found when pressing F1 -> Disassembly Explorer: Show.
I actually get the following message :
I suspect the issue to be the name of the HDD, since when I export the file name by right-click on the main.s file, I get the following value :
I already tried to replace / by \\ in the settings.json file, it changed nothing.
I am running Visual studio code on Windows 10, and I integrated my cygwin bash terminal as the single terminal in Visual Studio Code.
I suspect the HDD letter case to matter as well as the first / as mentionned in #1
Would you have a workaround to provide, eventually ?
Otherwise, I'll wait for a fix :)
I could find #3, but it did not help me since I am using fileDirname instead of workspaceFolder
Best,
Julien
The text was updated successfully, but these errors were encountered: