Re: [fpc-devel] How to manually control debug information

2005-06-03 Thread Florian Klaempfl
Peter Vreman wrote: At 19:36 2-6-2005, you wrote: Hello, I'm writting a custom preprocessor and I would like that the line number information maps to the original file. An example (not real, only an example): ...original.pas... 21 procedure AddFive(var a, b: Integer); 22 begin

Re: [fpc-devel] How to manually control debug information

2005-06-03 Thread Marco van de Voort
I'm writting a custom preprocessor and I would like that the line number information maps to the original file. An example (not real, only an example): ...original.pas... 21 procedure AddFive(var a, b: Integer); 22 begin 23 a := ++b; 24 end; After preprocessor:

Re: [fpc-devel] How to manually control debug information

2005-06-03 Thread Nico Aragón
El Viernes, 3 de Junio de 2005 09:56, Marco van de Voort escribió: If you have a preprocessor, you will also need a binary postprocessor to edit the linenumbers. In the executable? Isn't there any previous step to hook into? Anyway, where could I find information about the structures that

Re: [fpc-devel] How to manually control debug information

2005-06-03 Thread Marco van de Voort
El Viernes, 3 de Junio de 2005 09:56, Marco van de Voort escribi?: If you have a preprocessor, you will also need a binary postprocessor to edit the linenumbers. In the executable? Isn't there any previous step to hook into? Yes. The generated assembler. Anyway, where could I find

Re: [fpc-devel] How to manually control debug information

2005-06-03 Thread Florian Klaempfl
Nico Aragón wrote: El Viernes, 3 de Junio de 2005 09:12, Florian Klaempfl escribió: Since preprocessed code isn't read by human, why don't change it into procedure AddFive(var a, b: Integer); begin Inc(b); a := b; end; The compiler don't care and you get correct line numbers. Clever!

Re: [fpc-devel] How to manually control debug information

2005-06-03 Thread Nico Aragón
El Viernes, 3 de Junio de 2005 11:44, Marco van de Voort escribió: El Viernes, 3 de Junio de 2005 09:56, Marco van de Voort escribi?: If you have a preprocessor, you will also need a binary postprocessor to edit the linenumbers. In the executable? Isn't there any previous step to hook

Re: [fpc-devel] How to manually control debug information

2005-06-03 Thread Peter Vreman
gcc docs mainly (stabs) Thank you, also Florian and Peter, of course. It seems that I have more than enough options :-) For an simple stabs parser see rtl/inc/lineinfo.pp ___ fpc-devel maillist - fpc-devel@lists.freepascal.org

Re: [fpc-devel] How to manually control debug information

2005-06-03 Thread Peter Vreman
Since preprocessed code isn't read by human, why don't change it into procedure AddFive(var a, b: Integer); begin Inc(b); a := b; end; The compiler don't care and you get correct line numbers. Clever! But won't the compiler care if a line gets too long? No. The compiler itself doesn't

Re: [fpc-devel] How to manually control debug information

2005-06-02 Thread Peter Vreman
At 19:36 2-6-2005, you wrote: Hello, I'm writting a custom preprocessor and I would like that the line number information maps to the original file. An example (not real, only an example): ...original.pas... 21 procedure AddFive(var a, b: Integer); 22 begin 23 a := ++b; 24 end;