소스 검색

Add DEBUG_PPU conditional code to be able to debug ppu changes (only useful for debugging purposes)

git-svn-id: trunk@42110 -
pierre 6 년 전
부모
커밋
dd418f24b5
2개의 변경된 파일568개의 추가작업 그리고 5개의 파일을 삭제
  1. 541 5
      compiler/entfile.pas
  2. 27 0
      compiler/ppu.pas

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 541 - 5
compiler/entfile.pas


+ 27 - 0
compiler/ppu.pas

@@ -102,6 +102,9 @@ type
     function getheadersize:longint;override;
     function getheaderaddr:pentryheader;override;
     procedure resetfile;override;
+{$ifdef DEBUG_PPU}
+    procedure ppu_log(st :string);override;
+{$endif}
   public
     header           : tppuheader;
     { crc for the entire unit }
@@ -235,6 +238,30 @@ begin
   result:=not crc_only;
 end;
 
+{$ifdef DEBUG_PPU}
+procedure tppufile.ppu_log(st :string);
+begin
+  inherited ppu_log(st);
+  if flog_open then
+    begin
+      if do_crc and (ppu_log_idx < bufstart+bufidx) then
+        begin
+          writeln(flog,'New crc : ',hexstr(dword(crc),8));
+          writeln(flog,'New interface crc : ',hexstr(dword(interface_crc),8));
+          writeln(flog,'New indirect crc : ',hexstr(dword(indirect_crc),8));
+          ppu_log_idx:=bufstart+bufidx;
+         end;
+    end;
+{$ifdef IN_PPUDUMP}
+  if update_crc then
+    begin
+      writeln('New crc : ',hexstr(dword(crc),8));
+      writeln('New interface crc : ',hexstr(dword(interface_crc),8));
+      writeln('New indirect crc : ',hexstr(dword(indirect_crc),8));
+    end;
+{$endif}
+end;
+{$endif}
 
 {*****************************************************************************
                                 TPPUFile Reading

이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.