I've tried the suggested flag. Unfortunately, it does not appear to change anything. More importantly, upon further investigation, it seems like debugging does not work properly at all.
```bash tcc -gdwarf -o main.exe main.c gdb main GNU gdb (GDB) 16.3 (gdb) b main (gdb) r Thread 1 hit Breakpoint 1, main () at main.c:2 2 { (gdb) s main () at main.c:4 4 test = test + 1; (gdb) info locals No locals. (gdb) p test No symbol "test" in the current context. ``` It seems that for some reason, debugging information is not complete. I'm using tcc-0.9.27 (x86_64 windows) that I built from the source code using build-tcc.bat and gdb-16.3 from msys2. On Tue, Aug 26, 2025 at 5:52 PM noneofyourbusiness < noneofyourbusin...@danwin1210.de> wrote: > > I'm trying to debug a very simple program in GDB[...] > > tcc -g -o main.exe main.c > How about 'tcc -gdwarf -o main.exe main.c' for DWARF instead of STABS > debug information? > That worked out better for me so far. > We should fix both in case of a defect as long as we don't remove stabs > entirely (which I'd be in favor of). > Another possibility in the mean time would be to make DWARF the default > format for -g, as it seems to be the more reliable output from tcc. >
_______________________________________________ Tinycc-devel mailing list Tinycc-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/tinycc-devel