Re: [Tinycc-devel] [patch] adding path resolution to #line directives

2022-05-05 Thread Michael Matz
Hey, On Thu, 5 May 2022, Raul Hernandez wrote: The code we generate looks something like this:     #line 29 "../../../../../../home/spaceface/git/v/v/vlib/builtin/builtin.c.v" It would seem better to canonicalize during generating this, because the above ...    

Re: [Tinycc-devel] [patch] adding path resolution to #line directives

2022-05-05 Thread Domingo Alvarez Duarte
Why don't you do the collapse at generation time ? On 5/5/22 10:50, Raul Hernandez wrote: Hi, list. Over at vlang/v, we use #line directives to map line numbers in the generated C to the respective locations in the original code in backtraces, etc. The code we generate looks something like

[Tinycc-devel] dwarf support

2022-05-05 Thread Herman ten Brugge via Tinycc-devel
The new gcc12 release does not support stabs any more. This was a good reason to add support for dwarf. You can enable this by configuring with option --dwarf=x where x=2..5 Most targets should support version 5. Apple probably needs some adjustments in tccmacho.c for this to work. I do not

[Tinycc-devel] [macOS] gdwarf

2022-05-05 Thread Christian Jullien
Hi again, Another thread for macOS: jullien@mobley:~ $ tcc -gdwarf foo.c -o foo tcc: error: ELF section 7 not mapped into Mach-O for symbol As with Windows, -gdwarf should be either ignored or raise an error if used on macOS. C. ___

[Tinycc-devel] dwarf is silently ignored on Windows

2022-05-05 Thread Christian Jullien
Hello (Herman) Thank you for dwarf addition. I've just tested mob on Windows (as well as on other few other systems). It looks that dwarf is silently ignored on Windows and behaves as this option was not supplied: /cygdrive/f/tinycc/win32 $ ./tcc -g foo.c && ls -ls foo.exe 8

[Tinycc-devel] [patch] adding path resolution to #line directives

2022-05-05 Thread Raul Hernandez
Hi, list. Over at vlang/v, we use #line directives to map line numbers in the generated C to the respective locations in the original code in backtraces, etc. The code we generate looks something like this: #line 29 "../../../../../../home/spaceface/git/v/v/vlib/builtin/builtin.c.v"