BartmanAbyss / vscode-amiga-debug

One-stop Visual Studio Code Extension to compile, debug and profile Amiga C/C++ programs compiled by the bundled gcc 12.2 with the bundled WinUAE/FS-UAE.
GNU General Public License v3.0
319 stars 40 forks source link

Breakpoints not working on vasm when using 'section code' instead of 'code' #262

Closed AntonioDrusin closed 3 months ago

AntonioDrusin commented 3 months ago

Simply just create two test.asm files, one in the root and one in a subfolder. Breakpoints in the root file will work, breakpoints in the file in the subfolder will not

-utils

I tried to figure it out, but it seems that elfm68k-amiga-elf-gdb.exe (in windows) is accepting the breakpoints (no error), but then it is not breaking at that place. mi2.ts does not receive a reason of breakpoint-hit at all.

I tried -D_WIN32 in the VASMFLAGS, but that changes nothing obvious (.o files do not contain further folder information, elf file mostly unchanged).

Is this an interesting issue to work on, or is the suggestion to just work with a flat file structure?

AntonioDrusin commented 3 months ago

Rereading this. the files must not both be named "test.asm", otherwise there is another issue where they override each oter in the obj folder, but I think that is not an issue worth working on.

And my question is really, is everyone ok putting all files in the root or do you put your files in folders?

AntonioDrusin commented 3 months ago

This is more complicated than that. Sometimes it does act on the breakpoints and sometimes it does not. This requires me to do a lot more to get exact repro steps.

AntonioDrusin commented 3 months ago

Changed the title. Further investigation show that in this particular instance i had "section code" before the 68k instructions instead of just "code" that was enough to fix this. Not that i did try a new project with two files and one of them did not hit the breakpoint, it may have been a different issue or just a bit of flakiness since the breakpoints are happening at the beginning.