~ubuntu-branches/ubuntu/dapper/fpc/dapper

« back to all changes in this revision

Viewing changes to compiler/utils/ppudump.pp

  • Committer: Bazaar Package Importer
  • Author(s): Carlos Laviola
  • Date: 2005-05-30 11:59:10 UTC
  • mfrom: (1.2.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20050530115910-x5pbzm4qqta4i94h
Tags: 2.0.0-2
debian/fp-compiler.postinst.in: forgot to reapply the patch that
correctly creates the slave link to pc(1).  (Closes: #310907)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
{
2
 
    $Id: ppudump.pp,v 1.50 2003/12/16 21:29:25 florian Exp $
 
2
    $Id: ppudump.pp,v 1.69 2005/04/24 20:00:57 florian Exp $
3
3
    Copyright (c) 1998-2002 by the FPC Development Team
4
4
 
5
5
    Dumps the contents of a FPC unit file (PPU File)
28
28
  ppu;
29
29
 
30
30
const
31
 
  Version   = 'Version 1.10';
 
31
  Version   = 'Version 1.9.8';
32
32
  Title     = 'PPU-Analyser';
33
 
  Copyright = 'Copyright (c) 1998-2003 by the Free Pascal Development Team';
 
33
  Copyright = 'Copyright (c) 1998-2005 by the Free Pascal Development Team';
34
34
 
35
35
{ verbosity }
36
36
  v_none           = $0;
58
58
  tprocinfoflags=set of tprocinfoflag;
59
59
 
60
60
  { Copied from systems.pas }
61
 
  ttargetcpu=
62
 
  (
63
 
        no_cpu,                   { 0 }
64
 
        i386,                     { 1 }
65
 
        m68k,                     { 2 }
66
 
        alpha,                    { 3 }
67
 
        powerpc,                  { 4 }
68
 
        sparc,                    { 5 }
69
 
        vm                        { 6 }
70
 
  );
 
61
       tsystemcpu=
 
62
       (
 
63
             cpu_no,                       { 0 }
 
64
             cpu_i386,                     { 1 }
 
65
             cpu_m68k,                     { 2 }
 
66
             cpu_alpha,                    { 3 }
 
67
             cpu_powerpc,                  { 4 }
 
68
             cpu_sparc,                    { 5 }
 
69
             cpu_vm,                       { 6 }
 
70
             cpu_iA64,                     { 7 }
 
71
             cpu_x86_64,                   { 8 }
 
72
             cpu_mips,                     { 9 }
 
73
             cpu_arm                       { 10 }
 
74
       );
71
75
 
72
76
var
73
77
  ppufile     : tppufile;
74
78
  space       : string;
75
 
  unitnumber,
76
79
  unitindex   : longint;
77
80
  verbose     : longint;
78
81
  derefdata   : pbyte;
89
92
   has_errors:=true;
90
93
End;
91
94
 
 
95
 
 
96
function ToStr(w:longint):String;
 
97
begin
 
98
  Str(w,ToStr);
 
99
end;
 
100
 
92
101
Function Target2Str(w:longint):string;
93
102
type
94
103
       { taken from systems.pas }
122
131
             target_m68k_openbsd,       { 25 }
123
132
             system_x86_64_linux,       { 26 }
124
133
             system_powerpc_macosx,     { 27 }
125
 
             target_i386_emx            { 28 }
 
134
             target_i386_emx,           { 28 }
 
135
             target_powerpc_netbsd,     { 29 }
 
136
             target_powerpc_openbsd,    { 30 }
 
137
             target_arm_linux,          { 31 }
 
138
             target_i386_watcom,        { 32 }
 
139
             target_powerpc_MorphOS,    { 33 }
 
140
             target_x86_64_freebsd,     { 34 }
 
141
             target_i386_netwlibc       { 35 }
126
142
       );
127
143
const
128
 
  Targets : array[ttarget] of string[16]=(
 
144
  Targets : array[ttarget] of string[17]=(
129
145
  { 0 }   'none',
130
146
  { 1 }   'GO32V1',
131
147
  { 2 }   'GO32V2',
145
161
  { 16 }  'BeOS-i386',
146
162
  { 17 }  'NetBSD-i386',
147
163
  { 18 }  'NetBSD-m68k',
148
 
  { 19 }  'Netware',
 
164
  { 19 }  'Netware-i386-clib',
149
165
  { 20 }  'Qnx-i386',
150
166
  { 21 }  'WDOSX-i386',
151
167
  { 22 }  'Solaris-sparc',
154
170
  { 25 }  'OpenBSD-m68k',
155
171
  { 26 }  'Linux-x86-64',
156
172
  { 27 }  'MacOSX-ppc',
157
 
  { 28 }  'OS/2 via EMX'
 
173
  { 28 }  'OS/2 via EMX',
 
174
  { 29 }  'NetBSD-powerpc',
 
175
  { 30 }  'OpenBSD-powerpc',
 
176
  { 31 }  'Linux-arm',
 
177
  { 32 }  'Watcom-i386',
 
178
  { 33 }  'MorphOS-powerpc',
 
179
  { 34 }  'FreeBSD-x86-64',
 
180
  { 35 }  'Netware-i386-libc'
158
181
  );
159
182
begin
160
183
  if w<=ord(high(ttarget)) then
161
184
    Target2Str:=Targets[ttarget(w)]
162
185
  else
163
 
    Target2Str:='<Unknown>';
 
186
    Target2Str:='<!! Unknown target value '+tostr(w)+'>';
164
187
end;
165
188
 
166
189
 
167
190
Function Cpu2Str(w:longint):string;
168
191
const
169
 
  CpuTxt : array[ttargetcpu] of string[7]=
170
 
    ('none','i386','m68k','alpha','powerpc','sparc','vis');
 
192
  CpuTxt : array[tsystemcpu] of string[8]=
 
193
    ('none','i386','m68k','alpha','powerpc','sparc','vis','ia64','x86_64','mips','arm');
171
194
begin
172
 
  if w<=ord(high(ttargetcpu)) then
173
 
    Cpu2Str:=CpuTxt[ttargetcpu(w)]
 
195
  if w<=ord(high(tsystemcpu)) then
 
196
    Cpu2Str:=CpuTxt[tsystemcpu(w)]
174
197
  else
175
 
    Cpu2Str:='<Unknown>';
 
198
    Cpu2Str:='<!! Unknown cpu value '+tostr(w)+'>';
176
199
end;
177
200
 
178
201
 
183
206
  if w<=ord(high(varspezstr)) then
184
207
    Varspez2Str:=varspezstr[w]
185
208
  else
186
 
    Varspez2Str:='<Unknown>';
 
209
    Varspez2Str:='<!! Unknown varspez value '+tostr(w)+'>';
 
210
end;
 
211
 
 
212
Function VarRegable2Str(w:longint):string;
 
213
const
 
214
  varregableStr : array[0..3] of string[6]=('None','IntReg','FPUReg','MMReg');
 
215
begin
 
216
  if w<=ord(high(varregablestr)) then
 
217
    Varregable2Str:=varregablestr[w]
 
218
  else
 
219
    Varregable2Str:='<!! Unknown regable value '+tostr(w)+'>';
187
220
end;
188
221
 
189
222
 
194
227
    str  : string[30];
195
228
  end;
196
229
const
197
 
  flagopts=16;
 
230
  flagopts=19;
198
231
  flagopt : array[1..flagopts] of tflagopt=(
199
232
    (mask: $1    ;str:'init'),
200
233
    (mask: $2    ;str:'final'),
211
244
    (mask: $1000  ;str:'little_endian'),
212
245
    (mask: $2000  ;str:'release'),
213
246
    (mask: $4000  ;str:'local_threadvars'),
214
 
    (mask: $8000  ;str:'fpu emulation on')
 
247
    (mask: $8000  ;str:'fpu_emulation_on'),
 
248
    (mask: $10000  ;str:'has_debug_info'),
 
249
    (mask: $20000  ;str:'local_symtable'),
 
250
    (mask: $40000  ;str:'uses_variants')
215
251
  );
216
252
var
217
253
  i : longint;
299
335
                             Read Routines
300
336
****************************************************************************}
301
337
 
302
 
function getint64:int64;
303
 
var
304
 
  l1,l2 : longint;
305
 
begin
306
 
  l1:=ppufile.getlongint;
307
 
  l2:=ppufile.getlongint;
308
 
  getint64:=(int64(l2) shl 32) or qword(l1);
309
 
end;
310
 
 
311
338
Procedure ReadLinkContainer(const prefix:string);
312
339
{
313
340
  Read a serie of strings and write to the screen starting every line
362
389
 
363
390
procedure ReadLoadUnit;
364
391
var
365
 
  ucrc,uintfcrc : longint;
 
392
  ucrc,uintfcrc : cardinal;
366
393
begin
367
394
  while not ppufile.EndOfEntry do
368
395
    begin
369
 
      inc(unitnumber);
370
 
      write('Uses unit: ',ppufile.getstring,' (Number: ',unitnumber,')');
371
 
      ucrc:=ppufile.getlongint;
372
 
      uintfcrc:=ppufile.getlongint;
 
396
      write('Uses unit: ',ppufile.getstring);
 
397
      ucrc:=cardinal(ppufile.getlongint);
 
398
      uintfcrc:=cardinal(ppufile.getlongint);
373
399
      writeln(' (Crc: ',hexstr(ucrc,8),', IntfcCrc: ',hexstr(uintfcrc,8),')');
374
400
    end;
375
401
end;
376
402
 
377
403
 
 
404
Procedure ReadDerefmap;
 
405
var
 
406
  i,mapsize : longint;
 
407
begin
 
408
  mapsize:=ppufile.getword;
 
409
  writeln('DerefMapsize: ',mapsize);
 
410
  for i:=0 to mapsize-1 do
 
411
    writeln('DerefMap[',i,'] = ',ppufile.getstring);
 
412
end;
 
413
 
 
414
 
378
415
Procedure ReadDerefdata;
379
416
begin
380
417
  derefdatalen:=ppufile.entrysize;
498
535
var
499
536
  b : tdereftype;
500
537
  first : boolean;
501
 
  idx : word;
 
538
  idx : longint;
502
539
  i,n : byte;
503
540
  pdata : pbyte;
504
541
begin
631
668
    sp_private,
632
669
    sp_published,
633
670
    sp_protected,
634
 
    sp_forwarddef,
635
671
    sp_static,
636
 
    sp_primary_typesym    { this is for typesym, to know who is the primary symbol of a def }
 
672
    sp_hint_deprecated,
 
673
    sp_hint_platform,
 
674
    sp_hint_library,
 
675
    sp_hint_unimplemented,
 
676
    sp_has_overloaded,
 
677
    sp_internal  { internal symbol, not reported as unused }
637
678
  );
638
679
  tsymoptions=set of tsymoption;
639
680
  tsymopt=record
641
682
    str  : string[30];
642
683
  end;
643
684
const
644
 
  symopts=7;
 
685
  symopts=11;
645
686
  symopt : array[1..symopts] of tsymopt=(
646
687
     (mask:sp_public;         str:'Public'),
647
688
     (mask:sp_private;        str:'Private'),
648
689
     (mask:sp_published;      str:'Published'),
649
690
     (mask:sp_protected;      str:'Protected'),
650
 
     (mask:sp_forwarddef;     str:'ForwardDef'),
651
691
     (mask:sp_static;         str:'Static'),
652
 
     (mask:sp_primary_typesym;str:'PrimaryTypeSym')
 
692
     (mask:sp_hint_deprecated;str:'Hint Deprecated'),
 
693
     (mask:sp_hint_deprecated;str:'Hint Platform'),
 
694
     (mask:sp_hint_deprecated;str:'Hint Library'),
 
695
     (mask:sp_hint_deprecated;str:'Hint Unimplemented'),
 
696
     (mask:sp_has_overloaded; str:'Has overloaded'),
 
697
     (mask:sp_internal;       str:'Internal')
653
698
  );
654
699
var
655
700
  symoptions : tsymoptions;
674
719
end;
675
720
 
676
721
 
 
722
procedure readcommonsym(const s:string);
 
723
begin
 
724
  writeln(space,'** Symbol Nr. ',ppufile.getword,' **');
 
725
  writeln(space,s,ppufile.getstring);
 
726
  write(space,'     File Pos : ');
 
727
  readposinfo;
 
728
  write(space,'   SymOptions : ');
 
729
  readsymoptions;
 
730
end;
 
731
 
 
732
 
 
733
procedure readcommondef(const s:string);
 
734
type
 
735
  tdefoption=(df_none,
 
736
    df_has_inittable,           { init data has been generated }
 
737
    df_has_rttitable,           { rtti data has been generated }
 
738
    df_unique
 
739
  );
 
740
  tdefoptions=set of tdefoption;
 
741
var
 
742
  defopts : tdefoptions;
 
743
begin
 
744
  writeln(space,'** Definition Nr. ',ppufile.getword,' **');
 
745
  writeln(space,s);
 
746
  write  (space,'      Type symbol : ');
 
747
  readderef;
 
748
  ppufile.getsmallset(defopts);
 
749
 
 
750
  if df_unique in defopts then
 
751
    writeln  (space,'      Unique type symbol');
 
752
 
 
753
  if df_has_rttitable in defopts then
 
754
   begin
 
755
     write  (space,'      RTTI symbol : ');
 
756
     readderef;
 
757
   end;
 
758
  if df_has_inittable in defopts then
 
759
   begin
 
760
     write  (space,'      Init symbol : ');
 
761
     readderef;
 
762
   end;
 
763
end;
 
764
 
 
765
 
677
766
{ Read abstract procdef and return if inline procdef }
678
767
type
679
768
  tproccalloption=(pocall_none,
680
 
    pocall_cdecl,         { procedure uses C styled calling }
681
 
    pocall_cppdecl,       { C++ calling conventions }
682
 
    pocall_compilerproc,  { Procedure is used for internal compiler calls }
683
 
    pocall_far16,         { Far16 for OS/2 }
684
 
    pocall_fpccall,       { FPC default calling }
685
 
    pocall_inline,        { Procedure is an assembler macro }
686
 
    pocall_internproc,    { Procedure has compiler magic}
687
 
    pocall_palmossyscall, { procedure is a PalmOS system call }
688
 
    pocall_pascal,        { pascal standard left to right }
689
 
    pocall_register,      { procedure uses register (fastcall) calling }
690
 
    pocall_safecall,      { safe call calling conventions }
691
 
    pocall_stdcall,       { procedure uses stdcall call }
692
 
    pocall_system         { system call }
 
769
    { procedure uses C styled calling }
 
770
    pocall_cdecl,
 
771
    { C++ calling conventions }
 
772
    pocall_cppdecl,
 
773
    { Procedure is used for internal compiler calls }
 
774
    pocall_compilerproc,
 
775
    { Far16 for OS/2 }
 
776
    pocall_far16,
 
777
    { Old style FPC default calling }
 
778
    pocall_oldfpccall,
 
779
    { Procedure is an assembler macro }
 
780
    pocall_inline,
 
781
    { Procedure has compiler magic}
 
782
    pocall_internproc,
 
783
    { procedure is a system call, applies e.g. to MorphOS and PalmOS }
 
784
    pocall_syscall,
 
785
    { pascal standard left to right }
 
786
    pocall_pascal,
 
787
    { procedure uses register (fastcall) calling }
 
788
    pocall_register,
 
789
    { safe call calling conventions }
 
790
    pocall_safecall,
 
791
    { procedure uses stdcall call }
 
792
    pocall_stdcall,
 
793
    { Special calling convention for cpus without a floating point
 
794
      unit. Floating point numbers are passed in integer registers
 
795
      instead of floating point registers. Depending on the other
 
796
      available calling conventions available for the cpu
 
797
      this replaces either pocall_fastcall or pocall_stdcall.
 
798
    }
 
799
    pocall_softfloat,
 
800
    { Metrowerks Pascal. Special case on Mac OS (X): passes all }
 
801
    { constant records by reference.                            }
 
802
    pocall_mwpascal    
693
803
  );
694
804
  tproccalloptions=set of tproccalloption;
695
805
  tproctypeoption=(potype_none,
715
825
    po_msgint,            { method for int message handling }
716
826
    po_exports,           { Procedure has export directive (needed for OS/2) }
717
827
    po_external,          { Procedure is external (in other object or lib)}
718
 
    po_savestdregs,       { save std regs cdecl and stdcall need that ! }
719
 
    po_saveregisters,     { save all registers }
720
828
    po_overload,          { procedure is declared with overload directive }
721
829
    po_varargs,           { printf like arguments }
722
 
    po_leftright,         { push arguments from left to right }
723
 
    po_clearstack,        { caller clears the stack }
724
830
    po_internconst,       { procedure has constant evaluator intern }
725
 
    po_addressonly,       { flag that only the address of a method is returned and not a full methodpointer }
726
 
    po_public             { procedure is exported }
 
831
    { flag that only the address of a method is returned and not a full methodpointer }
 
832
    po_addressonly,
 
833
    { procedure is exported }
 
834
    po_public,
 
835
    { calling convention is specified explicitly }
 
836
    po_hascallingconvention,
 
837
    { reintroduce flag }
 
838
    po_reintroduce,
 
839
    { location of parameters is given explicitly as it is necessary for some syscall
 
840
      conventions like that one of MorphOS }
 
841
    po_explicitparaloc,
 
842
    { no stackframe will be generated, used by lowlevel assembler like get_frame }
 
843
    po_nostackframe,
 
844
    po_has_mangledname,
 
845
    po_has_public_name,
 
846
    po_forward,
 
847
    po_global
727
848
  );
728
849
  tprocoptions=set of tprocoption;
729
 
function read_abstract_proc_def:tproccalloption;
 
850
procedure read_abstract_proc_def(var proccalloption:tproccalloption;var procoptions:tprocoptions);
730
851
type
731
852
  tproccallopt=record
732
853
    mask : tproccalloption;
746
867
     'CPPDecl',
747
868
     'CompilerProc',
748
869
     'Far16',
749
 
     'FPCCall',
 
870
     'OldFPCCall',
750
871
     'Inline',
751
872
     'InternProc',
752
 
     'PalmOSSysCall',
 
873
     'SysCall',
753
874
     'Pascal',
754
875
     'Register',
755
876
     'SafeCall',
756
877
     'StdCall',
757
 
     'System'
 
878
     'SoftFloat',
 
879
     'MWPascal'
758
880
   );
759
881
  proctypeopts=6;
760
882
  proctypeopt : array[1..proctypeopts] of tproctypeopt=(
765
887
     (mask:potype_destructor;  str:'Destructor'),
766
888
     (mask:potype_operator;    str:'Operator')
767
889
  );
768
 
  procopts=22;
 
890
  procopts=26;
769
891
  procopt : array[1..procopts] of tprocopt=(
770
892
     (mask:po_classmethod;     str:'ClassMethod'),
771
893
     (mask:po_virtualmethod;   str:'VirtualMethod'),
780
902
     (mask:po_msgint;          str:'MsgInt'),
781
903
     (mask:po_exports;         str:'Exports'),
782
904
     (mask:po_external;        str:'External'),
783
 
     (mask:po_savestdregs;     str:'SaveStdRegs'),
784
 
     (mask:po_saveregisters;   str:'SaveRegisters'),
785
905
     (mask:po_overload;        str:'Overload'),
786
906
     (mask:po_varargs;         str:'VarArgs'),
787
 
     (mask:po_leftright;       str:'LeftRight'),
788
 
     (mask:po_clearstack;      str:'ClearStack'),
789
907
     (mask:po_internconst;     str:'InternConst'),
790
908
     (mask:po_addressonly;     str:'AddressOnly'),
791
 
     (mask:po_public;          str:'Public')
 
909
     (mask:po_public;          str:'Public'),
 
910
     (mask:po_hascallingconvention;str:'HasCallingConvention'),
 
911
     (mask:po_reintroduce;     str:'ReIntroduce'),
 
912
     (mask:po_explicitparaloc; str:'ExplicitParaloc'),
 
913
     (mask:po_nostackframe;    str:'NoStackFrame'),
 
914
     (mask:po_has_mangledname; str:'HasMangledName'),
 
915
     (mask:po_has_public_name; str:'HasPublicName'),
 
916
     (mask:po_forward;         str:'Forward'),
 
917
     (mask:po_global;          str:'Global')
792
918
  );
793
919
var
794
920
  proctypeoption  : tproctypeoption;
795
 
  proccalloption  : tproccalloption;
796
 
  procoptions     : tprocoptions;
797
 
  i,params : longint;
798
 
  first    : boolean;
 
921
  i     : longint;
 
922
  first : boolean;
 
923
  tempbuf : array[0..255] of byte;
799
924
begin
800
925
  write(space,'      Return type : ');
801
926
  readtype;
817
942
     writeln;
818
943
   end;
819
944
  proccalloption:=tproccalloption(ppufile.getbyte);
820
 
  read_abstract_proc_def:=proccalloption;
821
945
  writeln(space,'       CallOption : ',proccalloptionStr[proccalloption]);
822
946
  ppufile.getsmallset(procoptions);
823
947
  if procoptions<>[] then
835
959
       end;
836
960
     writeln;
837
961
   end;
838
 
  params:=ppufile.getbyte;
839
 
  writeln(space,' Nr of parameters : ',params);
840
 
  for i:=1 to params do
841
 
   begin
842
 
     writeln(space,' - Parameter ',i);
843
 
     writeln(space,'       Spez : ',Varspez2Str(ppufile.getbyte));
844
 
     write  (space,'       Type : ');
845
 
     readtype;
846
 
     write  (space,'    Default : ');
847
 
     readderef;
848
 
     write  (space,'     Symbol : ');
849
 
     readderef;
850
 
     writeln(space,'  Is Hidden : ',(ppufile.getbyte<>0));
851
 
   end;
852
 
end;
853
 
 
854
 
 
855
 
procedure readcommonsym(const s:string);
856
 
begin
857
 
  writeln(space,'** Symbol Nr. ',ppufile.getword,' **');
858
 
  writeln(space,s,ppufile.getstring);
859
 
  write(space,'    File Pos: ');
860
 
  readposinfo;
861
 
  write(space,'  SymOptions: ');
862
 
  readsymoptions;
863
 
end;
864
 
 
865
 
 
866
 
procedure readcommondef(const s:string);
867
 
type
868
 
  tdefoption=(df_none,
869
 
    df_has_inittable,           { init data has been generated }
870
 
    df_has_rttitable,           { rtti data has been generated }
871
 
    df_unique
872
 
  );
873
 
  tdefoptions=set of tdefoption;
 
962
  if (po_explicitparaloc in procoptions) then
 
963
    begin
 
964
      i:=ppufile.getbyte;
 
965
      ppufile.getdata(tempbuf,i);
 
966
    end;
 
967
end;
 
968
 
 
969
 
 
970
type
 
971
  { options for variables }
 
972
  tvaroption=(vo_none,
 
973
    vo_is_C_var,
 
974
    vo_is_external,
 
975
    vo_is_dll_var,
 
976
    vo_is_thread_var,
 
977
    vo_has_local_copy,
 
978
    vo_is_const,  { variable is declared as const (parameter) and can't be written to }
 
979
    vo_is_exported,
 
980
    vo_is_high_para,
 
981
    vo_is_funcret,
 
982
    vo_is_self,
 
983
    vo_is_vmt,
 
984
    vo_is_result,  { special result variable }
 
985
    vo_is_parentfp,
 
986
    vo_is_loop_counter, { used to detect assignments to loop counter }
 
987
    vo_is_hidden_para,
 
988
    vo_has_explicit_paraloc,
 
989
    vo_is_syscall_lib,
 
990
    vo_has_mangledname
 
991
  );
 
992
  tvaroptions=set of tvaroption;
 
993
  { register variable }
 
994
  tvarregable=(vr_none,
 
995
    vr_intreg,
 
996
    vr_fpureg,
 
997
    vr_mmreg
 
998
  );
 
999
procedure readabstractvarsym(const s:string;var varoptions:tvaroptions);
 
1000
type
 
1001
  tvaropt=record
 
1002
    mask : tvaroption;
 
1003
    str  : string[30];
 
1004
  end;
 
1005
const
 
1006
  varopts=18;
 
1007
  varopt : array[1..varopts] of tvaropt=(
 
1008
     (mask:vo_is_C_var;        str:'CVar'),
 
1009
     (mask:vo_is_external;     str:'External'),
 
1010
     (mask:vo_is_dll_var;      str:'DLLVar'),
 
1011
     (mask:vo_is_thread_var;   str:'ThreadVar'),
 
1012
     (mask:vo_has_local_copy;  str:'HasLocalCopy'),
 
1013
     (mask:vo_is_const;        str:'Constant'),
 
1014
     (mask:vo_is_exported;     str:'Exported'),
 
1015
     (mask:vo_is_high_para;    str:'HighValue'),
 
1016
     (mask:vo_is_funcret;      str:'Funcret'),
 
1017
     (mask:vo_is_self;         str:'Self'),
 
1018
     (mask:vo_is_vmt;          str:'VMT'),
 
1019
     (mask:vo_is_result;       str:'Result'),
 
1020
     (mask:vo_is_parentfp;     str:'ParentFP'),
 
1021
     (mask:vo_is_loop_counter; str:'LoopCounter'),
 
1022
     (mask:vo_is_hidden_para;  str:'Hidden'),
 
1023
     (mask:vo_has_explicit_paraloc;str:'ExplicitParaloc'),
 
1024
     (mask:vo_is_syscall_lib;  str:'SysCallLib'),
 
1025
     (mask:vo_has_mangledname; str:'HasMangledName')
 
1026
  );
874
1027
var
875
 
  defopts : tdefoptions;
 
1028
  i : longint;
 
1029
  first : boolean;
876
1030
begin
877
 
  writeln(space,'** Definition Nr. ',ppufile.getword,' **');
878
 
  writeln(space,s);
879
 
  write  (space,'      Type symbol : ');
880
 
  readderef;
881
 
  ppufile.getsmallset(defopts);
882
 
 
883
 
  if df_unique in defopts then
884
 
    writeln  (space,'      Unique type symbol');
885
 
 
886
 
  if df_has_rttitable in defopts then
887
 
   begin
888
 
     write  (space,'      RTTI symbol : ');
889
 
     readderef;
890
 
   end;
891
 
  if df_has_inittable in defopts then
892
 
   begin
893
 
     write  (space,'      Init symbol : ');
894
 
     readderef;
 
1031
  readcommonsym(s);
 
1032
  writeln(space,'         Spez : ',Varspez2Str(ppufile.getbyte));
 
1033
  writeln(space,'      Regable : ',Varregable2Str(ppufile.getbyte));
 
1034
  write  (space,'     Var Type : ');
 
1035
  readtype;
 
1036
  ppufile.getsmallset(varoptions);
 
1037
  if varoptions<>[] then
 
1038
   begin
 
1039
     write(space,'      Options : ');
 
1040
     first:=true;
 
1041
     for i:=1to varopts do
 
1042
      if (varopt[i].mask in varoptions) then
 
1043
       begin
 
1044
         if first then
 
1045
           first:=false
 
1046
         else
 
1047
           write(', ');
 
1048
         write(varopt[i].str);
 
1049
       end;
 
1050
     writeln;
895
1051
   end;
896
1052
end;
897
1053
 
928
1084
 
929
1085
procedure readsymbols(const s:string);
930
1086
type
931
 
  { options for variables }
932
 
  tvaroption=(vo_none,
933
 
    vo_regable,
934
 
    vo_is_C_var,
935
 
    vo_is_external,
936
 
    vo_is_dll_var,
937
 
    vo_is_thread_var,
938
 
    vo_fpuregable,
939
 
    vo_is_local_copy,
940
 
    vo_is_const,  { variable is declared as const (parameter) and can't be written to }
941
 
    vo_is_exported,
942
 
    vo_is_high_value
943
 
  );
944
 
  tvaroptions=set of tvaroption;
945
 
 
946
1087
  pguid = ^tguid;
947
1088
  tguid = packed record
948
1089
    D1: LongWord;
953
1094
 
954
1095
  absolutetyp = (tovar,toasm,toaddr);
955
1096
  tconsttyp = (constnone,
956
 
    constord,conststring,constreal,constbool,
957
 
    constint,constchar,constset,constpointer,constnil,
958
 
    constresourcestring,constwstring,constwchar,constguid
 
1097
    constord,conststring,constreal,
 
1098
    constset,constpointer,constnil,
 
1099
    constresourcestring,constwstring,constguid
959
1100
  );
960
1101
var
961
1102
  b      : byte;
964
1105
  symcnt,
965
1106
  i,j,len : longint;
966
1107
  guid : tguid;
967
 
 
 
1108
  tempbuf : array[0..127] of char;
 
1109
  varoptions : tvaroptions;
968
1110
begin
969
1111
  symcnt:=1;
970
1112
  with ppufile do
998
1140
         ibtypesym :
999
1141
           begin
1000
1142
             readcommonsym('Type symbol ');
1001
 
             write(space,' Result Type: ');
 
1143
             write(space,'  Result Type : ');
1002
1144
             readtype;
1003
1145
           end;
1004
1146
 
1008
1150
             len:=ppufile.getword;
1009
1151
             for i:=1 to len do
1010
1152
              begin
1011
 
                write(space,'  Definition: ');
 
1153
                write(space,'   Definition : ');
1012
1154
                readderef;
1013
1155
              end;
1014
1156
           end;
1020
1162
             case tconsttyp(b) of
1021
1163
               constord :
1022
1164
                 begin
1023
 
                   write   (space,'OrdinalType: ');
 
1165
                   write  (space,'  OrdinalType : ');
1024
1166
                   readtype;
1025
 
                   writeln (space,'      Value: ',getlongint)
 
1167
                   writeln(space,'        Value : ',getint64);
1026
1168
                 end;
1027
1169
               constpointer :
1028
1170
                 begin
1029
 
                   write (space,' Pointer Type: ');
 
1171
                   write  (space,'  PointerType : ');
1030
1172
                   readtype;
1031
 
                   writeln (space,'      Value: ',getlongint)
 
1173
                   writeln(space,'        Value : ',getlongint)
1032
1174
                 end;
1033
1175
               conststring,
1034
1176
               constresourcestring :
1036
1178
                   len:=getlongint;
1037
1179
                   getmem(pc,len+1);
1038
1180
                   getdata(pc^,len);
1039
 
                   writeln(space,'      Length: ',len);
1040
 
                   writeln(space,'       Value: "',pc,'"');
 
1181
                   (pc+len)^:= #0;
 
1182
                   writeln(space,'       Length : ',len);
 
1183
                   writeln(space,'        Value : "',pc,'"');
1041
1184
                   freemem(pc,len+1);
1042
1185
                   if tconsttyp(b)=constresourcestring then
1043
 
                    writeln(space,'       Index: ',getlongint);
 
1186
                    writeln(space,'        Index : ',getlongint);
1044
1187
                 end;
1045
1188
               constreal :
1046
 
                 writeln(space,'       Value: ',getreal);
1047
 
               constbool :
1048
 
                 if getlongint<>0 then
1049
 
                   writeln (space,'      Value : True')
1050
 
                 else
1051
 
                   writeln (space,'      Value: False');
1052
 
               constint :
1053
 
                 writeln(space,'       Value: ',getint64);
1054
 
               constchar :
1055
 
                 writeln(space,'       Value: "'+chr(getlongint)+'"');
 
1189
                 writeln(space,'        Value : ',getreal);
1056
1190
               constset :
1057
1191
                 begin
1058
 
                   write (space,'     Set Type: ');
 
1192
                   write (space,'      Set Type : ');
1059
1193
                   readtype;
1060
1194
                   for i:=1to 4 do
1061
1195
                    begin
1062
 
                      write (space,'       Value: ');
 
1196
                      write (space,'        Value : ');
1063
1197
                      for j:=1to 8 do
1064
1198
                       begin
1065
1199
                         if j>1 then
1072
1206
               constwstring:
1073
1207
                 begin
1074
1208
                 end;
1075
 
               constwchar:
1076
 
                 writeln(space,'       Value: #',getlongint);
1077
1209
               constguid:
1078
1210
                 begin
1079
1211
                    getdata(guid,sizeof(guid));
1090
1222
             end;
1091
1223
           end;
1092
1224
 
1093
 
         ibvarsym :
1094
 
           begin
1095
 
             readcommonsym('Variable symbol ');
1096
 
             writeln(space,'        Spez: ',Varspez2Str(getbyte));
1097
 
             writeln(space,'     Address: ',getlongint);
1098
 
             write  (space,'    Var Type: ');
1099
 
             readtype;
1100
 
             i:=getlongint;
1101
 
             writeln(space,'     Options: ',i);
1102
 
             if (vo_is_C_var in tvaroptions(i)) then
1103
 
               writeln(space,' Mangledname: ',getstring);
 
1225
         ibabsolutevarsym :
 
1226
           begin
 
1227
             readabstractvarsym('Absolute variable symbol ',varoptions);
 
1228
             Write (space,' Relocated to ');
 
1229
             b:=getbyte;
 
1230
             case absolutetyp(b) of
 
1231
               tovar :
 
1232
                 readsymlist(space+'          Sym : ');
 
1233
               toasm :
 
1234
                 Writeln('Assembler name : ',getstring);
 
1235
               toaddr :
 
1236
                 begin
 
1237
                   Write('Address : ',getlongint);
 
1238
                   if tsystemcpu(ppufile.header.cpu)=cpu_i386 then
 
1239
                     WriteLn(' (Far: ',getbyte<>0,')');
 
1240
                 end;
 
1241
               else
 
1242
                 Writeln ('!! Invalid unit format : Invalid absolute type encountered: ',b);
 
1243
             end;
 
1244
           end;
 
1245
 
 
1246
         ibfieldvarsym :
 
1247
           begin
 
1248
             readabstractvarsym('Field Variable symbol ',varoptions);
 
1249
             writeln(space,'      Address : ',getlongint);
 
1250
           end;
 
1251
 
 
1252
         ibglobalvarsym :
 
1253
           begin
 
1254
             readabstractvarsym('Global Variable symbol ',varoptions);
 
1255
             write  (space,' DefaultConst : ');
 
1256
             readderef;
 
1257
             if (vo_has_mangledname in varoptions) then
 
1258
               writeln(space,' Mangledname : ',getstring);
 
1259
           end;
 
1260
 
 
1261
         iblocalvarsym :
 
1262
           begin
 
1263
             readabstractvarsym('Local Variable symbol ',varoptions);
 
1264
             write  (space,' DefaultConst : ');
 
1265
             readderef;
 
1266
           end;
 
1267
 
 
1268
         ibparavarsym :
 
1269
           begin
 
1270
             readabstractvarsym('Parameter Variable symbol ',varoptions);
 
1271
             write  (space,' DefaultConst : ');
 
1272
             readderef;
 
1273
             writeln(space,'       ParaNr : ',getword);
 
1274
             if (vo_has_explicit_paraloc in varoptions) then
 
1275
               begin
 
1276
                 i:=getbyte;
 
1277
                 getdata(tempbuf,i);
 
1278
               end;
1104
1279
           end;
1105
1280
 
1106
1281
         ibenumsym :
1107
1282
           begin
1108
1283
             readcommonsym('Enumeration symbol ');
1109
 
             write  (space,'  Definition: ');
 
1284
             write  (space,'   Definition : ');
1110
1285
             readderef;
1111
 
             writeln(space,'       Value: ',getlongint);
 
1286
             writeln(space,'        Value : ',getlongint);
1112
1287
           end;
1113
1288
 
1114
1289
         ibsyssym :
1115
1290
           begin
1116
1291
             readcommonsym('Internal system symbol ');
1117
 
             writeln(space,' Internal Nr: ',getlongint);
 
1292
             writeln(space,'  Internal Nr : ',getlongint);
1118
1293
           end;
1119
1294
 
1120
1295
         ibrttisym :
1121
1296
           begin
1122
1297
             readcommonsym('RTTI symbol ');
1123
 
             writeln(space,'   RTTI Type: ',getbyte);
 
1298
             writeln(space,'    RTTI Type : ',getbyte);
 
1299
           end;
 
1300
 
 
1301
         ibmacrosym :
 
1302
           begin
 
1303
             readcommonsym('Macro symbol ');
 
1304
             writeln(space,'          Name: ',getstring);
 
1305
             writeln(space,'       Defined: ',getbyte);
 
1306
             writeln(space,'  Compiler var: ',getbyte);
 
1307
             len:=getlongint;
 
1308
             writeln(space,'  Value length: ',len);
 
1309
             if len > 0 then
 
1310
               begin
 
1311
                 getmem(pc,len+1);
 
1312
                 getdata(pc^,len);
 
1313
                 (pc+len)^:= #0;
 
1314
                 writeln(space,'         Value: "',pc,'"');
 
1315
                 freemem(pc,len+1);
 
1316
               end;
1124
1317
           end;
1125
1318
 
1126
1319
         ibtypedconstsym :
1127
1320
           begin
1128
1321
             readcommonsym('Typed constant ');
1129
 
             write  (space,' Constant Type: ');
1130
 
             readtype;
1131
 
             writeln(space,'   ReallyConst: ',(getbyte<>0));
1132
 
           end;
1133
 
 
1134
 
         ibabsolutesym :
1135
 
           begin
1136
 
             readcommonsym('Absolute variable symbol ');
1137
 
             writeln(space,'          Type: ',getbyte);
1138
 
             writeln(space,'       Address: ',getlongint);
1139
 
             write  (space,'      Var Type: ');
1140
 
             readtype;
1141
 
             writeln(space,'       Options: ',getlongint);
1142
 
             Write (space,' Relocated to ');
1143
 
             b:=getbyte;
1144
 
             case absolutetyp(b) of
1145
 
               tovar :
1146
 
                 Writeln('Name : ',getstring);
1147
 
               toasm :
1148
 
                 Writeln('Assembler name : ',getstring);
1149
 
               toaddr :
1150
 
                 begin
1151
 
                   Write('Address : ',getlongint);
1152
 
                   WriteLn(' (Far: ',getbyte<>0,')');
1153
 
                 end;
1154
 
               else
1155
 
                 Writeln ('!! Invalid unit format : Invalid absolute type encountered: ',b);
1156
 
             end;
 
1322
             write  (space,'  Constant Type : ');
 
1323
             readtype;
 
1324
             writeln(space,'    ReallyConst : ',(getbyte<>0));
1157
1325
           end;
1158
1326
 
1159
1327
         ibpropertysym :
1160
1328
           begin
1161
1329
             readcommonsym('Property ');
1162
1330
             i:=getlongint;
1163
 
             writeln(space,' PropOptions: ',i);
 
1331
             writeln(space,'  PropOptions : ',i);
1164
1332
             if (i and 32)>0 then
1165
1333
              begin
1166
 
                write  (space,'OverrideProp: ');
 
1334
                write  (space,' OverrideProp : ');
1167
1335
                readderef;
1168
1336
              end
1169
1337
             else
1170
1338
              begin
1171
 
                write  (space,'   Prop Type: ');
1172
 
                readtype;
1173
 
                writeln(space,'       Index: ',getlongint);
1174
 
                writeln(space,'     Default: ',getlongint);
1175
 
                write  (space,'  Index Type: ');
1176
 
                readtype;
1177
 
                write  (space,'  Readaccess: ');
1178
 
                readsymlist(space+'         Sym: ');
1179
 
                write  (space,' Writeaccess: ');
1180
 
                readsymlist(space+'         Sym: ');
1181
 
                write  (space,'Storedaccess: ');
 
1339
                write  (space,'    Prop Type : ');
 
1340
                readtype;
 
1341
                writeln(space,'        Index : ',getlongint);
 
1342
                writeln(space,'      Default : ',getlongint);
 
1343
                write  (space,'   Index Type : ');
 
1344
                readtype;
 
1345
                write  (space,'   Readaccess : ');
 
1346
                readsymlist(space+'         Sym: ');
 
1347
                write  (space,'  Writeaccess : ');
 
1348
                readsymlist(space+'         Sym: ');
 
1349
                write  (space,' Storedaccess : ');
1182
1350
                readsymlist(space+'         Sym: ');
1183
1351
              end;
1184
1352
           end;
1233
1401
  totaldefs,l,j,
1234
1402
  defcnt : longint;
1235
1403
  calloption : tproccalloption;
 
1404
  procoptions : tprocoptions;
1236
1405
  procinfooptions : tprocinfoflag;
1237
1406
 
1238
1407
begin
1312
1481
         ibprocdef :
1313
1482
           begin
1314
1483
             readcommondef('Procedure definition');
1315
 
             calloption:=read_abstract_proc_def;
1316
 
             if (getbyte<>0) then
 
1484
             read_abstract_proc_def(calloption,procoptions);
 
1485
             if (po_has_mangledname in procoptions) then
1317
1486
               writeln(space,'     Mangled name : ',getstring);
1318
 
             writeln(space,'  Overload Number : ',getword);
1319
1487
             writeln(space,'           Number : ',getword);
1320
1488
             writeln(space,'            Level : ',getbyte);
1321
1489
             write  (space,'            Class : ');
1326
1494
             readposinfo;
1327
1495
             write  (space,'       SymOptions : ');
1328
1496
             readsymoptions;
 
1497
             if tsystemcpu(ppufile.header.cpu)=cpu_powerpc then
 
1498
               begin
 
1499
                 { library symbol for AmigaOS/MorphOS }
 
1500
                 write  (space,'   Library symbol : ');
 
1501
                 readderef;
 
1502
               end;      
1329
1503
             if (calloption=pocall_inline) then
1330
1504
              begin
1331
1505
                write  (space,'       FuncretSym : ');
1332
1506
                readderef;
 
1507
                ppufile.getsmallset(procinfooptions);
 
1508
                writeln(space,'  ProcInfoOptions : ',dword(procinfooptions));
 
1509
                b := ppufile.getbyte;
 
1510
                writeln(space,' Inline node tree : ',b);
1333
1511
              end;
1334
1512
             if not EndOfEntry then
1335
1513
              Writeln('!! Entry has more information stored');
1338
1516
             readdefinitions('parast',false);
1339
1517
             readsymbols('parast');
1340
1518
             { localst }
1341
 
             if (calloption=pocall_inline) or
1342
 
                ((ppufile.header.flags and uf_local_browser) <> 0) then
 
1519
             if (calloption = pocall_inline) then
1343
1520
              begin
1344
1521
                readdefinitions('localst',false);
1345
1522
                readsymbols('localst');
1346
1523
              end;
1347
 
             { code }
1348
1524
             if (calloption=pocall_inline) then
1349
 
               begin
1350
 
                 readnodetree;
1351
 
                 ppufile.getsmallset(procinfooptions);
1352
 
                 writeln(space,'  ProcInfoOptions : ',dword(procinfooptions));
1353
 
               end;
 
1525
               readnodetree;
1354
1526
             delete(space,1,4);
1355
1527
           end;
1356
1528
 
1357
1529
         ibprocvardef :
1358
1530
           begin
1359
1531
             readcommondef('Procedural type (ProcVar) definition');
1360
 
             read_abstract_proc_def;
 
1532
             read_abstract_proc_def(calloption,procoptions);
1361
1533
             if not EndOfEntry then
1362
1534
              Writeln('!! Entry has more information stored');
1363
1535
             space:='    '+space;
1394
1566
         ibrecorddef :
1395
1567
           begin
1396
1568
             readcommondef('Record definition');
1397
 
             writeln(space,'             Size : ',getlongint);
 
1569
             writeln(space,'         DataSize : ',getlongint);
 
1570
             writeln(space,'       FieldAlign : ',getbyte);
 
1571
             writeln(space,'      RecordAlign : ',getbyte);
 
1572
             writeln(space,'         PadAlign : ',getbyte);
1398
1573
             if not EndOfEntry then
1399
1574
              Writeln('!! Entry has more information stored');
1400
1575
             {read the record definitions and symbols}
1417
1592
               odt_cppclass       : writeln('cppclass');
1418
1593
               else                 writeln('!! Warning: Invalid object type ',b);
1419
1594
             end;
1420
 
             writeln(space,'             Size : ',getlongint);
 
1595
             writeln(space,'    Name of Class : ',getstring);
 
1596
             writeln(space,'         DataSize : ',getlongint);
 
1597
             writeln(space,'       FieldAlign : ',getbyte);
 
1598
             writeln(space,'      RecordAlign : ',getbyte);
1421
1599
             writeln(space,'       Vmt offset : ',getlongint);
1422
 
             writeln(space,'    Name of Class : ',getstring);
1423
1600
             write(space,  '   Ancestor Class : ');
1424
1601
             readderef;
1425
1602
             writeln(space,'          Options : ',getlongint);
1567
1744
                inc(sourcenumber);
1568
1745
              end;
1569
1746
           end;
1570
 
 
 
1747
{$IFDEF MACRO_DIFF_HINT}
1571
1748
         ibusedmacros :
1572
1749
           begin
1573
1750
             while not EndOfEntry do
1585
1762
                  writeln;
1586
1763
              end;
1587
1764
           end;
1588
 
 
 
1765
{$ENDIF}
1589
1766
         ibloadunit :
1590
1767
           ReadLoadUnit;
1591
1768
 
1610
1787
         ibderefdata :
1611
1788
           ReadDerefData;
1612
1789
 
 
1790
         ibderefmap :
 
1791
           ReadDerefMap;
 
1792
 
1613
1793
         iberror :
1614
1794
           begin
1615
1795
             Writeln('Error in PPU');
1808
1988
   end
1809
1989
  else
1810
1990
   ppufile.skipuntilentry(ibendsyms);
 
1991
 
 
1992
{read the macro symbols}
 
1993
  if (verbose and v_syms)<>0 then
 
1994
   begin
 
1995
     Writeln;
 
1996
     Writeln('Interface Macro Symbols');
 
1997
     Writeln('-----------------------');
 
1998
   end;
 
1999
  if ppufile.readentry<>ibexportedmacros then
 
2000
    begin
 
2001
      Writeln('!! Error in PPU');
 
2002
      exit;
 
2003
    end;
 
2004
  if boolean(ppufile.getbyte) then
 
2005
    begin
 
2006
      {skip the definition section for macros (since they are never used) }
 
2007
      ppufile.skipuntilentry(ibenddefs);
 
2008
      {read the macro symbols}
 
2009
      if (verbose and v_syms)<>0 then
 
2010
        readsymbols('interface macro')
 
2011
      else
 
2012
        ppufile.skipuntilentry(ibendsyms);
 
2013
    end
 
2014
  else
 
2015
    Writeln('(no exported macros)');
 
2016
 
1811
2017
{read the implementation stuff}
1812
2018
  if (verbose and v_implementation)<>0 then
1813
2019
   begin
1819
2025
  else
1820
2026
   ppufile.skipuntilentry(ibendimplementation);
1821
2027
{read the static browser units stuff}
1822
 
  if (ppufile.header.flags and uf_local_browser)<>0 then
 
2028
  if (ppufile.header.flags and uf_local_symtable)<>0 then
1823
2029
   begin
1824
2030
     if (verbose and v_defs)<>0 then
1825
2031
      begin
1837
2043
        Writeln('Static Symbols');
1838
2044
        Writeln('------------------');
1839
2045
        readsymbols('implementation');
1840
 
      end;
 
2046
      end
 
2047
     else
 
2048
      ppufile.skipuntilentry(ibendsyms);
1841
2049
   end;
1842
2050
{read the browser units stuff}
1843
2051
  if (ppufile.header.flags and uf_has_browser)<>0 then
1899
2107
  writeln('                   D - Show interface definitions');
1900
2108
  writeln('                   B - Show browser info');
1901
2109
  writeln('                   A - Show all');
1902
 
  writeln('    -?           This helpscreen');
 
2110
  writeln('    -h, -?       This helpscreen');
1903
2111
  halt;
1904
2112
end;
1905
2113
 
1926
2134
     case upcase(para[2]) of
1927
2135
      'V' : begin
1928
2136
              verbose:=0;
1929
 
              for i:=3to length(para) do
 
2137
              for i:=3 to length(para) do
1930
2138
               case upcase(para[i]) of
1931
2139
                'H' : verbose:=verbose or v_header;
1932
2140
                'I' : verbose:=verbose or v_interface;
1937
2145
                'A' : verbose:=verbose or v_all;
1938
2146
               end;
1939
2147
            end;
 
2148
      'H' : help;
1940
2149
      '?' : help;
1941
2150
     end;
1942
2151
     inc(startpara);
1949
2158
end.
1950
2159
{
1951
2160
  $Log: ppudump.pp,v $
1952
 
  Revision 1.50  2003/12/16 21:29:25  florian
1953
 
    + inlined procedures inherit procinfo flags
1954
 
 
1955
 
  Revision 1.49  2003/12/08 21:04:08  peter
1956
 
    * line break in uses unit
1957
 
 
1958
 
  Revision 1.48  2003/11/10 22:02:52  peter
1959
 
    * cross unit inlining fixed
1960
 
 
1961
 
  Revision 1.47  2003/10/22 20:40:00  peter
1962
 
    * write derefdata in a separate ppu entry
1963
 
 
1964
 
  Revision 1.46  2003/07/02 22:18:04  peter
1965
 
    * paraloc splitted in callerparaloc,calleeparaloc
1966
 
    * sparc calling convention updates
1967
 
 
1968
 
  Revision 1.45  2003/06/25 18:31:23  peter
1969
 
    * sym,def resolving partly rewritten to support also parent objects
1970
 
      not directly available through the uses clause
1971
 
 
1972
 
  Revision 1.44  2003/06/09 12:59:00  peter
1973
 
    * updated for new deref info
1974
 
 
1975
 
  Revision 1.43  2003/06/05 20:06:11  peter
1976
 
    * new procoptions
1977
 
 
1978
 
  Revision 1.42  2003/05/09 17:47:03  peter
1979
 
    * self moved to hidden parameter
1980
 
    * removed hdisposen,hnewn,selfn
1981
 
 
1982
 
  Revision 1.41  2003/04/27 07:29:52  peter
1983
 
    * aktprocdef cleanup, aktprocdef is now always nil when parsing
1984
 
      a new procdef declaration
1985
 
    * aktprocsym removed
1986
 
    * lexlevel removed, use symtable.symtablelevel instead
1987
 
    * implicit init/final code uses the normal genentry/genexit
1988
 
    * funcret state checking updated for new funcret handling
1989
 
 
1990
 
  Revision 1.39  2003/04/25 20:59:35  peter
1991
 
    * removed funcretn,funcretsym, function result is now in varsym
1992
 
      and aliases for result and function name are added using absolutesym
1993
 
    * vs_hidden parameter for funcret passed in parameter
1994
 
    * vs_hidden fixes
1995
 
    * writenode changed to printnode and released from extdebug
1996
 
    * -vp option added to generate a tree.log with the nodetree
1997
 
    * nicer printnode for statements, callnode
1998
 
 
1999
 
  Revision 1.38  2003/04/10 17:57:53  peter
2000
 
    * vs_hidden released
2001
 
 
2002
 
  Revision 1.37  2003/03/24 19:57:54  hajny
2003
 
    + emx target added
2004
 
 
2005
 
  Revision 1.36  2003/03/17 15:54:22  peter
2006
 
    * store symoptions also for procdef
2007
 
    * check symoptions (private,public) when calculating possible
2008
 
      overload candidates
2009
 
 
2010
 
  Revision 1.35  2003/01/03 22:16:29  peter
2011
 
    * updated for absolutesym and varsym
2012
 
 
2013
 
  Revision 1.34  2002/11/17 16:32:04  carl
2014
 
    * memory optimization (3-4%) : cleanup of tai fields,
2015
 
       cleanup of tdef and tsym fields.
2016
 
    * make it work for m68k
2017
 
 
2018
 
  Revision 1.33  2002/10/20 14:49:31  peter
2019
 
    * store original source time in ppu so it can be compared instead of
2020
 
      comparing with the ppu time
2021
 
 
2022
 
  Revision 1.32  2002/10/06 12:25:53  florian
2023
 
    + dump of tdefoptions.df_unique
2024
 
 
2025
 
  Revision 1.31  2002/09/27 21:22:04  carl
2026
 
    * update system information
2027
 
 
2028
 
  Revision 1.30  2002/09/26 12:03:54  florian
2029
 
    + support of constguid and constwchar const symbols added
2030
 
 
2031
 
  Revision 1.29  2002/08/20 16:54:40  peter
2032
 
    * write address of varsym always
2033
 
 
2034
 
  Revision 1.28  2002/08/19 19:36:44  peter
2035
 
    * More fixes for cross unit inlining, all tnodes are now implemented
2036
 
    * Moved pocall_internconst to po_internconst because it is not a
2037
 
      calling type at all and it conflicted when inlining of these small
2038
 
      functions was requested
2039
 
 
2040
 
  Revision 1.27  2002/08/15 15:15:56  carl
2041
 
    * jmpbuf size allocation for exceptions is now cpu specific (as it should)
2042
 
    * more generic nodes for maths
2043
 
    * several fixes for better m68k support
2044
 
 
2045
 
  Revision 1.26  2002/08/11 13:24:20  peter
2046
 
    * saving of asmsymbols in ppu supported
2047
 
    * asmsymbollist global is removed and moved into a new class
2048
 
      tasmlibrarydata that will hold the info of a .a file which
2049
 
      corresponds with a single module. Added librarydata to tmodule
2050
 
      to keep the library info stored for the module. In the future the
2051
 
      objectfiles will also be stored to the tasmlibrarydata class
2052
 
    * all getlabel/newasmsymbol and friends are moved to the new class
2053
 
 
2054
 
  Revision 1.25  2002/05/18 13:34:27  peter
2055
 
    * readded missing revisions
2056
 
 
2057
 
  Revision 1.24  2002/05/16 19:46:54  carl
2058
 
  + defines.inc -> fpcdefs.inc to avoid conflicts if compiling by hand
2059
 
  + try to fix temp allocation (still in ifdef)
2060
 
  + generic constructor calls
2061
 
  + start of tassembler / tmodulebase class cleanup
2062
 
 
2063
 
  Revision 1.22  2002/05/12 16:53:18  peter
2064
 
    * moved entry and exitcode to ncgutil and cgobj
2065
 
    * foreach gets extra argument for passing local data to the
2066
 
      iterator function
2067
 
    * -CR checks also class typecasts at runtime by changing them
2068
 
      into as
2069
 
    * fixed compiler to cycle with the -CR option
2070
 
    * fixed stabs with elf writer, finally the global variables can
2071
 
      be watched
2072
 
    * removed a lot of routines from cga unit and replaced them by
2073
 
      calls to cgobj
2074
 
    * u32bit-s32bit updates for and,or,xor nodes. When one element is
2075
 
      u32bit then the other is typecasted also to u32bit without giving
2076
 
      a rangecheck warning/error.
2077
 
    * fixed pascal calling method with reversing also the high tree in
2078
 
      the parast, detected by tcalcst3 test
2079
 
 
2080
 
  Revision 1.21  2002/04/23 13:12:58  peter
2081
 
    * updated for posinfo change
2082
 
    * updated for mangledname change
2083
 
    * include i386 registers, removed reference to cpubase unit that would
2084
 
      make ppudump dependent on the source processor
2085
 
 
2086
 
  Revision 1.20  2002/04/15 19:15:09  carl
2087
 
  + write std_reg2str instead of gas registers
2088
 
 
2089
 
  Revision 1.19  2002/04/14 17:02:19  carl
2090
 
  + att_reg2str -> gas_reg2str
2091
 
 
2092
 
  Revision 1.18  2002/04/07 10:23:36  carl
2093
 
  + added vm / sparc targets
2094
 
 
2095
 
  Revision 1.17  2002/04/04 19:06:14  peter
2096
 
    * removed unused units
2097
 
    * use tlocation.size in cg.a_*loc*() routines
2098
 
 
2099
 
  Revision 1.16  2002/04/04 18:50:27  carl
2100
 
  + added wdosx support (patch from Pavel)
2101
 
 
2102
 
  Revision 1.15  2002/03/31 20:26:42  jonas
2103
 
    + a_loadfpu_* and a_loadmm_* methods in tcg
2104
 
    * register allocation is now handled by a class and is mostly processor
2105
 
      independent (+rgobj.pas and i386/rgcpu.pas)
2106
 
    * temp allocation is now handled by a class (+tgobj.pas, -i386\tgcpu.pas)
2107
 
    * some small improvements and fixes to the optimizer
2108
 
    * some register allocation fixes
2109
 
    * some fpuvaroffset fixes in the unary minus node
2110
 
    * push/popusedregisters is now called rg.save/restoreusedregisters and
2111
 
      (for i386) uses temps instead of push/pop's when using -Op3 (that code is
2112
 
      also better optimizable)
2113
 
    * fixed and optimized register saving/restoring for new/dispose nodes
2114
 
    * LOC_FPU locations now also require their "register" field to be set to
2115
 
      R_ST, not R_ST0 (the latter is used for LOC_CFPUREGISTER locations only)
2116
 
    - list field removed of the tnode class because it's not used currently
2117
 
      and can cause hard-to-find bugs
2118
 
 
2119
 
  Revision 1.14  2002/03/28 20:48:52  carl
2120
 
  - remove go32v1 support
2121
 
 
2122
 
  Revision 1.13  2002/03/28 16:44:59  armin
2123
 
  + new flag if unit has local threadvars
2124
 
 
2125
 
  Revision 1.12  2002/03/01 14:08:47  peter
2126
 
    * parasym added
2127
 
 
2128
 
  Revision 1.11  2002/01/06 12:08:16  peter
2129
 
    * removed uauto from orddef, use new range_to_basetype generating
2130
 
      the correct ordinal type for a range
 
2161
  Revision 1.69  2005/04/24 20:00:57  florian
 
2162
    + more module flags added
 
2163
 
 
2164
  Revision 1.68  2005/03/27 14:10:53  jonas
 
2165
    * const record parameters > 8 bytes are now passed by reference for non
 
2166
      cdecl/cppdecl procedures on Mac OS/Mac OS X to fix compatibility with
 
2167
      GPC (slightly more efficient than Metrowerks behaviour below, but
 
2168
      less efficient in most cases than our previous scheme)
 
2169
    + "mwpascal" procedure directive to support the const record parameter
 
2170
      behaviour of Metrowerks Pascal, which passes all const records by
 
2171
      reference
 
2172
 
 
2173
  Revision 1.67  2005/03/07 18:38:46  peter
 
2174
    * explicit paraloc for funcret
 
2175
    * libsym for powerpc ppu's
 
2176
 
 
2177
  Revision 1.66  2005/02/14 17:13:10  peter
 
2178
    * truncate log
 
2179
 
 
2180
  Revision 1.65  2005/01/19 22:19:41  peter
 
2181
    * unit mapping rewrite
 
2182
    * new derefmap added
 
2183
 
 
2184
  Revision 1.64  2005/01/09 20:24:43  olle
 
2185
    * rework of macro subsystem
 
2186
    + exportable macros for mode macpas
2131
2187
 
2132
2188
}