sorry for the pause and my English 
1. Debugging information.
1.1. Generate debugging information
To create a symbolic debugger requires some debugging information that would establish a link with the source code program.
It is noteworthy that in contrast to the traditional approach to other compilers (which uses an outdated, in my view, the approach), the AOS information exists for the position in the text, and not for line.
In the first place the idea of using FindPC for debugging information. However, it turned out that FindPC is not suitable for this task, as well as to find the position of the source code compiles address until the address code generated will not exceed the specified:
IF pc >= PCM.breakpc THEN PCM.Error(400, errpos, ""); PCM.breakpc := MAX(LONGINT) END; (* << mh 30.8.94 *)
This had to make a small addition to the procedure PCO.PutByte, PCO.PutWord, PCO.PutDWord. Before recording of bytes is called:
PROCEDURE PosInfo;
BEGIN
IF PCM.DebugInfo IN PCM.codeOptions THEN
IF errpos#PCM.debuglinepos THEN (*put info only if new source position*)
PCM.debuglinepos:=errpos;
PCM.WritePI(errpos,pc); (*write info in file*)
END;
END;
END PosInfo;
1.2. Compiler Options
It was added option "B" (Bug). Parsing options occurs in the PC. ParseOptions. Was added variable DebugInfo and the following code:
ELSIF ch = "B" THEN
cOpt := cOpt / {PCM.DebugInfo}
END
1.3. Creating a debug file
Debug information is stored in a separate file with the extension "Dpi" (Debug position information), the file name corresponds to the name of the module. Take the module name, rather than the source file name from the fact that in one source file can have multiple modules. Here there were problems with the implementation and I am not sure that everything was made correctly.
To use the Debug file were added to the PCM module is the following:
PROCEDURE CreatePIFile*(name:ARRAY OF CHAR);
VAR
file: Files.FileName;
BEGIN
IF DebugInfo IN codeOptions THEN
MakeFileName(file,name,"",".Dpi");
pif := Files.New(file);
Files.Register(pif);
Files.OpenWriter(piw, pif, 0);
debuglinepos:=-1;
END;
END CreatePIFile;
PROCEDURE WritePI*(a,b:LONGINT);
VAR
Ri: Files.Rider;
BEGIN
IF piw#NIL THEN
piw.RawLInt(a);
piw.RawLInt(b);
END;
END WritePI;
PROCEDURE ClosePIFile*;
BEGIN
IF DebugInfo IN codeOptions THEN
piw.Update;
END;
END ClosePIFile;
The file is created when the parser determines the module name in the procedure PCP.ParseInterface.
Closing the file occurs at the end of the cycle REPEAT in procedure PC.Module.
I very much doubt the correctness of their actions and look forward to the Board.