bflattened / bflat

C# as you know it but with Go-inspired tooling (small, selfcontained, and native executables)
GNU Affero General Public License v3.0
3.56k stars 102 forks source link

Debugging doesn't work on Linux #146

Open lucabol opened 5 months ago

lucabol commented 5 months ago

Repro below:

System.Console.WriteLine("Hello!");
bflat build -O0 Hello.cs
gdb --tui Hello
Note: breakpoint 1 also set at pc 0x28f3d0.
Breakpoint 2 at 0x28f3d0: file /home/lucabol/dev/bflat/src/zerolib/Hello.cs, line 1.
Warning:
Cannot insert breakpoint 1.
Cannot access memory at address 0x28f3d0

Breakpoint 1 at 0x28f3d0: file /home/lucabol/dev/bflat/src/zerolib/Hello.cs, line 1.
Starting program: /home/lucabol/dev/bflat/src/zerolib/Hello 
Warning:
Cannot insert breakpoint 1.
Cannot access memory at address 0x28f3d0
lucabol commented 5 months ago

FYI tested on Windows and it works (aka I can debug using VSCode).

MichalStrehovsky commented 5 months ago

Is the debugging support being broken specific to zerolib? Sorry my WSL linux is running into #139 and attempts to install the package then run into The following packages have unmet dependencies: and none of the suggestions by apt on fixing this work so I just gave up.

lucabol commented 5 months ago

No, it is not just zerolib. It doesn't seem to work for simple bflat Hello.cs.