Open rerdavies opened 3 years ago
Thank you for the comprehensive description! Relative paths handling should be fixed with commit e4b202996a3255789548ff35b35dd26d4b0fbfcf (release 0.2.2).
Regarding the reloading of file changes — it should work fine as well. I could not reproduce any issues after manual editing of the .s file. Could you please let me know if it works fine for you on 0.2.2?
Issue #1: I can't get my .s file to synch with the source view. I'm using a CMake build chain.
Issue #1: I'm guessing you don't deal with relative paths in the dissasembly file. Files are generated by a pretty stock CMake build. Note the relative paths: /home/patch/src/piddle/build/../src/main.cpp. Opening the Dissassembly window loads Piddle.s, but no matter what line I click on in main.cpp, the view of Piddle.s remains on line one.
Issue #2: Editing Piddle.s before launching Dissasembly view causes all tasks to hang.
It seems easy enough to search and replace /build/../src/ with /src/ in Piddle.s. 1) Load Piddle.s; 2) do the appropriate search and replace; 3) save and close.
When I do so, launching the Dissassembly view does nothing. In addition, other task, like CMake Build will not launch until VS code is restarted. Line tags now read "/home/patch/src/piddle/src/main.cpp:141"
Issue #3: Source lines still won't synch.
Convert Piddle.s relative paths to canonical paths. Close VS Code and re-open it. (Run a build to make sure everything is copacetic; or not. Doesn't seem to make a difference). Open main. Click on line 141. Launch dissasembly view. Result: Piddle.s window opens. Piddle.s view remains on line 0.
I also tried converting paths to ~/src/piddle/src/main.cpp, with no improvement.
Issue #4: Reloading Piddle.s.
I am under the strong impression that you don't reload Piddle.s if it changes on disk. You should be subscribing to file change notifications.
The relative source line thing may seem picky; but CMake is a very common toolchain for C/C++ projects. And the problem is not unsolvable. The solution is either: (1) pre-index the .S file, converting paths with ".."s, "."s (and probably "//"s to "/" in non-initial position -- I think linux does that) to canonical form. or (2): search for occurences of ^/(.*)/main.cpp\:()$, and then process the captured path to see if it matches.
Environment:
Raspberry Pi-4, running Rasbian (debian). G++ toolchain.
VSCode Environment: Version: 1.58.2 Commit: c3f126316369cd610563c75b1b1725e0679adfb3 Date: 2021-07-14T22:05:50.884Z Electron: 12.0.13 Chrome: 89.0.4389.128 Node.js: 14.16.0 V8: 8.9.255.25-electron.0 OS: Linux arm 5.10.17-v7l+