mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-06-10 15:18:28 +02:00
* 0.99.13
* new link support
This commit is contained in:
parent
01aceb4f07
commit
4f250dad55
@ -37,11 +37,7 @@ type
|
|||||||
{$endif Test_Double_checksum}
|
{$endif Test_Double_checksum}
|
||||||
|
|
||||||
const
|
const
|
||||||
{$ifdef OLDPPU}
|
|
||||||
CurrentPPUVersion=15;
|
|
||||||
{$else}
|
|
||||||
CurrentPPUVersion=16;
|
CurrentPPUVersion=16;
|
||||||
{$endif}
|
|
||||||
|
|
||||||
{ buffer sizes }
|
{ buffer sizes }
|
||||||
maxentrysize = 1024;
|
maxentrysize = 1024;
|
||||||
@ -65,19 +61,21 @@ const
|
|||||||
ibendbrowser = 254;
|
ibendbrowser = 254;
|
||||||
ibend = 255;
|
ibend = 255;
|
||||||
{general}
|
{general}
|
||||||
ibmodulename = 1;
|
ibmodulename = 1;
|
||||||
ibsourcefiles = 2;
|
ibsourcefiles = 2;
|
||||||
ibloadunit = 3;
|
ibloadunit = 3;
|
||||||
ibinitunit = 5;
|
ibinitunit = 4;
|
||||||
iblinkofiles = 6;
|
iblinkunitofiles = 5;
|
||||||
iblinksharedlibs = 7;
|
iblinkunitstaticlibs = 6;
|
||||||
iblinkstaticlibs = 8;
|
iblinkunitsharedlibs = 7;
|
||||||
ibdbxcount = 9;
|
iblinkotherofiles = 8;
|
||||||
ibsymref = 10;
|
iblinkotherstaticlibs = 9;
|
||||||
ibdefref = 11;
|
iblinkothersharedlibs = 10;
|
||||||
ibendsymtablebrowser = 12;
|
ibdbxcount = 11;
|
||||||
ibbeginsymtablebrowser = 13;
|
ibsymref = 12;
|
||||||
iblinkunitfiles = 14;
|
ibdefref = 13;
|
||||||
|
ibendsymtablebrowser = 14;
|
||||||
|
ibbeginsymtablebrowser = 15;
|
||||||
{syms}
|
{syms}
|
||||||
ibtypesym = 20;
|
ibtypesym = 20;
|
||||||
ibprocsym = 21;
|
ibprocsym = 21;
|
||||||
@ -117,12 +115,11 @@ const
|
|||||||
uf_big_endian = $4;
|
uf_big_endian = $4;
|
||||||
uf_has_dbx = $8;
|
uf_has_dbx = $8;
|
||||||
uf_has_browser = $10;
|
uf_has_browser = $10;
|
||||||
uf_smartlink = $20; { the ppu is smartlinked }
|
uf_in_library = $20; { is the file in another file than <ppufile>.* ? }
|
||||||
uf_in_library = $40; { is the file in another file than <ppufile>.* ? }
|
uf_smart_linked = $40; { the ppu can be smartlinked }
|
||||||
uf_static_linked = $80; { the ppu is linked in a static library }
|
uf_static_linked = $80; { the ppu can be linked static }
|
||||||
uf_shared_linked = $100; { the ppu is linked in a shared library }
|
uf_shared_linked = $100; { the ppu can be linked shared }
|
||||||
uf_local_browser = $200;
|
uf_local_browser = $200;
|
||||||
uf_obj_linked = $400; { the ppu is linked in a object file }
|
|
||||||
|
|
||||||
type
|
type
|
||||||
{$ifdef m68k}
|
{$ifdef m68k}
|
||||||
@ -142,10 +139,8 @@ type
|
|||||||
flags : longint;
|
flags : longint;
|
||||||
size : longint; { size of the ppufile without header }
|
size : longint; { size of the ppufile without header }
|
||||||
checksum : longint; { checksum for this ppufile }
|
checksum : longint; { checksum for this ppufile }
|
||||||
{$ifndef OLDPPU}
|
|
||||||
interface_checksum : longint;
|
interface_checksum : longint;
|
||||||
future : array[0..2] of longint;
|
future : array[0..2] of longint;
|
||||||
{$endif}
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
tppuentry=packed record
|
tppuentry=packed record
|
||||||
@ -235,11 +230,19 @@ implementation
|
|||||||
*****************************************************************************}
|
*****************************************************************************}
|
||||||
|
|
||||||
var
|
var
|
||||||
|
{$ifdef Delphi}
|
||||||
|
Crc32Tbl : array[0..255] of longword;
|
||||||
|
{$else Delphi}
|
||||||
Crc32Tbl : array[0..255] of longint;
|
Crc32Tbl : array[0..255] of longint;
|
||||||
|
{$endif Delphi}
|
||||||
|
|
||||||
procedure MakeCRC32Tbl;
|
procedure MakeCRC32Tbl;
|
||||||
var
|
var
|
||||||
|
{$ifdef Delphi}
|
||||||
|
crc : longword;
|
||||||
|
{$else Delphi}
|
||||||
crc : longint;
|
crc : longint;
|
||||||
|
{$endif Delphi}
|
||||||
i,n : byte;
|
i,n : byte;
|
||||||
begin
|
begin
|
||||||
for i:=0 to 255 do
|
for i:=0 to 255 do
|
||||||
@ -360,7 +363,8 @@ end;
|
|||||||
function tppufile.GetPPUVersion:longint;
|
function tppufile.GetPPUVersion:longint;
|
||||||
var
|
var
|
||||||
l : longint;
|
l : longint;
|
||||||
code : word;
|
code : integer;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Val(header.ver[1]+header.ver[2]+header.ver[3],l,code);
|
Val(header.ver[1]+header.ver[2]+header.ver[3],l,code);
|
||||||
if code=0 then
|
if code=0 then
|
||||||
@ -380,11 +384,7 @@ begin
|
|||||||
Id[3]:='U';
|
Id[3]:='U';
|
||||||
Ver[1]:='0';
|
Ver[1]:='0';
|
||||||
Ver[2]:='1';
|
Ver[2]:='1';
|
||||||
{$ifdef OLDPPU}
|
|
||||||
Ver[3]:='5';
|
|
||||||
{$else}
|
|
||||||
Ver[3]:='6';
|
Ver[3]:='6';
|
||||||
{$endif}
|
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -396,7 +396,12 @@ end;
|
|||||||
function tppufile.open:boolean;
|
function tppufile.open:boolean;
|
||||||
var
|
var
|
||||||
ofmode : byte;
|
ofmode : byte;
|
||||||
|
{$ifdef delphi}
|
||||||
|
i : integer;
|
||||||
|
{$else delphi}
|
||||||
i : word;
|
i : word;
|
||||||
|
{$endif delphi}
|
||||||
|
|
||||||
begin
|
begin
|
||||||
open:=false;
|
open:=false;
|
||||||
assign(f,fname);
|
assign(f,fname);
|
||||||
@ -792,7 +797,6 @@ begin
|
|||||||
if do_crc then
|
if do_crc then
|
||||||
begin
|
begin
|
||||||
crc:=UpdateCrc32(crc,b,len);
|
crc:=UpdateCrc32(crc,b,len);
|
||||||
{$ifndef OLDPPU}
|
|
||||||
if do_interface_crc then
|
if do_interface_crc then
|
||||||
begin
|
begin
|
||||||
interface_crc:=UpdateCrc32(interface_crc,b,len);
|
interface_crc:=UpdateCrc32(interface_crc,b,len);
|
||||||
@ -820,9 +824,6 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
if not crc_only then
|
if not crc_only then
|
||||||
{$else}
|
|
||||||
end;
|
|
||||||
{$endif OLDPPU}
|
|
||||||
writedata(b,len);
|
writedata(b,len);
|
||||||
inc(entryidx,len);
|
inc(entryidx,len);
|
||||||
end;
|
end;
|
||||||
@ -868,11 +869,23 @@ end;
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.1 1999-05-12 16:11:39 peter
|
Revision 1.2 1999-07-03 00:25:43 peter
|
||||||
* moved
|
* 0.99.13
|
||||||
|
* new link support
|
||||||
|
|
||||||
Revision 1.7 1999/04/26 18:27:38 peter
|
Revision 1.33 1999/05/13 21:59:36 peter
|
||||||
* more updates
|
* removed oldppu code
|
||||||
|
* warning if objpas is loaded from uses
|
||||||
|
* first things for new deref writing
|
||||||
|
|
||||||
|
Revision 1.32 1999/05/05 09:19:15 florian
|
||||||
|
* more fixes to get it with delphi running
|
||||||
|
|
||||||
|
Revision 1.31 1999/05/04 21:44:59 florian
|
||||||
|
* changes to compile it with Delphi 4.0
|
||||||
|
|
||||||
|
Revision 1.30 1999/04/26 18:30:00 peter
|
||||||
|
* farpointerdef moved into pointerdef.is_far
|
||||||
|
|
||||||
Revision 1.29 1999/04/26 13:31:41 peter
|
Revision 1.29 1999/04/26 13:31:41 peter
|
||||||
* release storenumber,double_checksum
|
* release storenumber,double_checksum
|
||||||
|
@ -26,7 +26,7 @@ program pppdump;
|
|||||||
uses ppu;
|
uses ppu;
|
||||||
|
|
||||||
const
|
const
|
||||||
Version = 'Version 0.99.12';
|
Version = 'Version 0.99.13';
|
||||||
Title = 'PPU-Analyser';
|
Title = 'PPU-Analyser';
|
||||||
Copyright = 'Copyright (c) 1995-99 by the Free Pascal Development Team';
|
Copyright = 'Copyright (c) 1995-99 by the Free Pascal Development Team';
|
||||||
|
|
||||||
@ -109,6 +109,46 @@ end;
|
|||||||
Read Routines
|
Read Routines
|
||||||
****************************************************************************}
|
****************************************************************************}
|
||||||
|
|
||||||
|
Procedure ReadLinkContainer(const prefix:string);
|
||||||
|
{
|
||||||
|
Read a serie of strings and write to the screen starting every line
|
||||||
|
with prefix
|
||||||
|
}
|
||||||
|
function maskstr(m:longint):string;
|
||||||
|
const
|
||||||
|
{ link options }
|
||||||
|
link_none = $0;
|
||||||
|
link_allways = $1;
|
||||||
|
link_static = $2;
|
||||||
|
link_smart = $4;
|
||||||
|
link_shared = $8;
|
||||||
|
var
|
||||||
|
s : string;
|
||||||
|
begin
|
||||||
|
s:='';
|
||||||
|
if (m and link_allways)<>0 then
|
||||||
|
s:=s+'always ';
|
||||||
|
if (m and link_static)<>0 then
|
||||||
|
s:=s+'static ';
|
||||||
|
if (m and link_smart)<>0 then
|
||||||
|
s:=s+'smart ';
|
||||||
|
if (m and link_shared)<>0 then
|
||||||
|
s:=s+'shared ';
|
||||||
|
maskstr:=s;
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
s : string;
|
||||||
|
m : longint;
|
||||||
|
begin
|
||||||
|
while not ppufile^.endofentry do
|
||||||
|
begin
|
||||||
|
s:=ppufile^.getstring;
|
||||||
|
m:=ppufile^.getlongint;
|
||||||
|
WriteLn(prefix,s,' (',maskstr(m),')');
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
Procedure ReadContainer(const prefix:string);
|
Procedure ReadContainer(const prefix:string);
|
||||||
{
|
{
|
||||||
Read a serie of strings and write to the screen starting every line
|
Read a serie of strings and write to the screen starting every line
|
||||||
@ -806,17 +846,23 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
iblinkofiles :
|
iblinkunitofiles :
|
||||||
ReadContainer('Link object file: ');
|
ReadLinkContainer('Link unit object file: ');
|
||||||
|
|
||||||
iblinkstaticlibs :
|
iblinkunitstaticlibs :
|
||||||
ReadContainer('Link static lib: ');
|
ReadLinkContainer('Link unit static lib: ');
|
||||||
|
|
||||||
iblinksharedlibs :
|
iblinkunitsharedlibs :
|
||||||
ReadContainer('Link shared lib: ');
|
ReadLinkContainer('Link unit shared lib: ');
|
||||||
|
|
||||||
iblinkunitfiles :
|
iblinkotherofiles :
|
||||||
ReadContainer('Link unit file: ');
|
ReadLinkContainer('Link other object file: ');
|
||||||
|
|
||||||
|
iblinkotherstaticlibs :
|
||||||
|
ReadLinkContainer('Link other static lib: ');
|
||||||
|
|
||||||
|
iblinkothersharedlibs :
|
||||||
|
ReadLinkContainer('Link other shared lib: ');
|
||||||
|
|
||||||
iberror :
|
iberror :
|
||||||
begin
|
begin
|
||||||
@ -986,18 +1032,16 @@ begin
|
|||||||
write('has_dbx ');
|
write('has_dbx ');
|
||||||
if (flags and uf_has_browser)<>0 then
|
if (flags and uf_has_browser)<>0 then
|
||||||
write('has_browser ');
|
write('has_browser ');
|
||||||
if (flags and uf_smartlink)<>0 then
|
|
||||||
write('smartlink ');
|
|
||||||
if (flags and uf_in_library)<>0 then
|
if (flags and uf_in_library)<>0 then
|
||||||
write('in_library ');
|
write('in_library ');
|
||||||
|
if (flags and uf_smart_linked)<>0 then
|
||||||
|
write('smart_linked ');
|
||||||
if (flags and uf_shared_linked)<>0 then
|
if (flags and uf_shared_linked)<>0 then
|
||||||
write('shared_linked ');
|
write('shared_linked ');
|
||||||
if (flags and uf_static_linked)<>0 then
|
if (flags and uf_static_linked)<>0 then
|
||||||
write('static_linked ');
|
write('static_linked ');
|
||||||
if (flags and uf_local_browser)<>0 then
|
if (flags and uf_local_browser)<>0 then
|
||||||
write('local_browser ');
|
write('local_browser ');
|
||||||
if (flags and uf_obj_linked)<>0 then
|
|
||||||
write('obj_linked ');
|
|
||||||
if (flags=0) then
|
if (flags=0) then
|
||||||
write('(none)');
|
write('(none)');
|
||||||
writeln;
|
writeln;
|
||||||
@ -1181,7 +1225,11 @@ begin
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.3 1999-06-08 22:16:06 peter
|
Revision 1.4 1999-07-03 00:25:44 peter
|
||||||
|
* 0.99.13
|
||||||
|
* new link support
|
||||||
|
|
||||||
|
Revision 1.3 1999/06/08 22:16:06 peter
|
||||||
* version 0.99.12
|
* version 0.99.12
|
||||||
|
|
||||||
Revision 1.2 1999/05/14 17:52:04 peter
|
Revision 1.2 1999/05/14 17:52:04 peter
|
||||||
|
Loading…
Reference in New Issue
Block a user