mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-14 07:09:23 +02:00
* Improve DEBUG_PPU code
* Move flog file closing from closefile method to destroy destructor. * Fix write_data output into flog git-svn-id: trunk@48890 -
This commit is contained in:
parent
bb83bb4203
commit
81402bb077
@ -380,6 +380,11 @@ end;
|
|||||||
destructor tentryfile.destroy;
|
destructor tentryfile.destroy;
|
||||||
begin
|
begin
|
||||||
closefile;
|
closefile;
|
||||||
|
{$ifdef DEBUG_PPU}
|
||||||
|
if flog_open then
|
||||||
|
close(flog);
|
||||||
|
flog_open:=false;
|
||||||
|
{$endif DEBUG_PPU}
|
||||||
if assigned(buf) then
|
if assigned(buf) then
|
||||||
freemem(buf,entryfilebufsize);
|
freemem(buf,entryfilebufsize);
|
||||||
end;
|
end;
|
||||||
@ -573,11 +578,6 @@ begin
|
|||||||
f.Free;
|
f.Free;
|
||||||
mode:=0;
|
mode:=0;
|
||||||
closed:=true;
|
closed:=true;
|
||||||
{$ifdef DEBUG_PPU}
|
|
||||||
if flog_open then
|
|
||||||
close(flog);
|
|
||||||
flog_open:=false;
|
|
||||||
{$endif DEBUG_PPU}
|
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -683,14 +683,6 @@ var
|
|||||||
begin
|
begin
|
||||||
p:=pchar(@b);
|
p:=pchar(@b);
|
||||||
pbuf:=@buf[bufidx];
|
pbuf:=@buf[bufidx];
|
||||||
{$ifdef DEBUG_PPU}
|
|
||||||
if ppu_log_level <= 0 then
|
|
||||||
begin
|
|
||||||
ppu_log('writedata, length='+tostr(len)+' level='+tostr(ppu_log_level));
|
|
||||||
for i:=0 to len-1 do
|
|
||||||
ppu_log_val('p['+tostr(i)+']=$'+hexstr(byte(p[i]),2));
|
|
||||||
end;
|
|
||||||
{$endif DEBUG_PPU}
|
|
||||||
repeat
|
repeat
|
||||||
left:=bufsize-bufidx;
|
left:=bufsize-bufidx;
|
||||||
if len<left then
|
if len<left then
|
||||||
@ -704,6 +696,14 @@ begin
|
|||||||
exit;
|
exit;
|
||||||
until false;
|
until false;
|
||||||
move(pbuf^,p^,len);
|
move(pbuf^,p^,len);
|
||||||
|
{$ifdef DEBUG_PPU}
|
||||||
|
if ppu_log_level <= 0 then
|
||||||
|
begin
|
||||||
|
ppu_log('writedata, length='+tostr(len)+' level='+tostr(ppu_log_level));
|
||||||
|
for i:=0 to len-1 do
|
||||||
|
ppu_log_val('p['+tostr(i)+']=$'+hexstr(byte(p[i]),2));
|
||||||
|
end;
|
||||||
|
{$endif DEBUG_PPU}
|
||||||
inc(bufidx,len);
|
inc(bufidx,len);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user