ppudump.pp 44 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563
  1. {
  2. $Id$
  3. Copyright (c) 1995-99 by the FPC Development Team
  4. Dumps the contents of a FPC unit file (PPU File)
  5. This program is free software; you can redistribute it and/or modify
  6. it under the terms of the GNU General Public License as published by
  7. the Free Software Foundation; either version 2 of the License, or
  8. (at your option) any later version.
  9. This program is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. GNU General Public License for more details.
  13. You should have received a copy of the GNU General Public License
  14. along with this program; if not, write to the Free Software
  15. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  16. ****************************************************************************}
  17. {$ifdef TP}
  18. {$N+,E+}
  19. {$endif}
  20. program pppdump;
  21. uses
  22. {$ifdef go32v2}
  23. dpmiexcp,
  24. {$endif go32v2}
  25. ppu;
  26. const
  27. Version = 'Version 0.99.13';
  28. Title = 'PPU-Analyser';
  29. Copyright = 'Copyright (c) 1995-99 by the Free Pascal Development Team';
  30. { verbosity }
  31. v_none = $0;
  32. v_header = $1;
  33. v_defs = $2;
  34. v_syms = $4;
  35. v_interface = $8;
  36. v_implementation = $10;
  37. v_browser = $20;
  38. v_all = $ff;
  39. var
  40. ppufile : pppufile;
  41. space : string;
  42. symcnt,
  43. defcnt : longint;
  44. read_member : boolean;
  45. verbose : longint;
  46. {****************************************************************************
  47. Helper Routines
  48. ****************************************************************************}
  49. const has_errors : boolean = false;
  50. Procedure Error(const S : string);
  51. Begin
  52. Writeln(S);
  53. has_errors:=true;
  54. End;
  55. Function Target2Str(w:longint):string;
  56. type
  57. ttarget = (target_none
  58. ,target_i386_GO32V1,target_i386_GO32V2,target_i386_linux,
  59. target_i386_OS2,target_i386_Win32
  60. ,target_m68k_Amiga,target_m68k_Atari,target_m68k_Mac,
  61. target_m68k_linux,target_m68k_PalmOS
  62. );
  63. const
  64. Targets : array[ttarget] of string[10]=('none',
  65. 'GO32V1','GO32V2','Linux-i386','OS/2','Win32',
  66. 'Amiga','Mac68k','Atari','Linux-m68k','PalmOs');
  67. begin
  68. if w<=ord(high(ttarget)) then
  69. Target2Str:=Targets[ttarget(w)]
  70. else
  71. Target2Str:='<Unknown>';
  72. end;
  73. Function Cpu2Str(w:longint):string;
  74. type
  75. ttargetcpu=(no_cpu
  76. ,i386,m68k,alpha
  77. );
  78. const
  79. CpuTxt : array[ttargetcpu] of string[5]=
  80. ('none','i386','m68k','alpha');
  81. begin
  82. if w<=ord(high(ttargetcpu)) then
  83. Cpu2Str:=CpuTxt[ttargetcpu(w)]
  84. else
  85. Cpu2Str:='<Unknown>';
  86. end;
  87. function PPUFlags2Str(flags:longint):string;
  88. type
  89. tflagopt=record
  90. mask : longint;
  91. str : string[30];
  92. end;
  93. const
  94. flagopts=11;
  95. flagopt : array[1..flagopts] of tflagopt=(
  96. (mask: $1 ;str:'init'),
  97. (mask: $2 ;str:'final'),
  98. (mask: $4 ;str:'big_endian'),
  99. (mask: $8 ;str:'dbx'),
  100. (mask: $10 ;str:'browser'),
  101. (mask: $20 ;str:'in_library'),
  102. (mask: $40 ;str:'smart_linked'),
  103. (mask: $80 ;str:'static_linked'),
  104. (mask: $100 ;str:'shared_linked'),
  105. (mask: $200 ;str:'local_browser'),
  106. (mask: $400 ;str:'no_link')
  107. );
  108. var
  109. i : longint;
  110. first : boolean;
  111. s : string;
  112. begin
  113. s:='';
  114. if flags<>0 then
  115. begin
  116. first:=true;
  117. for i:=1to flagopts do
  118. if (flags and flagopt[i].mask)<>0 then
  119. begin
  120. if first then
  121. first:=false
  122. else
  123. s:=s+', ';
  124. s:=s+flagopt[i].str;
  125. end;
  126. end
  127. else
  128. s:='none';
  129. PPUFlags2Str:=s;
  130. end;
  131. const
  132. HexTbl : array[0..15] of char='0123456789ABCDEF';
  133. function HexB(b:byte):string;
  134. begin
  135. HexB[0]:=#2;
  136. HexB[1]:=HexTbl[b shr 4];
  137. HexB[2]:=HexTbl[b and $f];
  138. end;
  139. {****************************************************************************
  140. Read Routines
  141. ****************************************************************************}
  142. Procedure ReadLinkContainer(const prefix:string);
  143. {
  144. Read a serie of strings and write to the screen starting every line
  145. with prefix
  146. }
  147. function maskstr(m:longint):string;
  148. const
  149. { link options }
  150. link_none = $0;
  151. link_allways = $1;
  152. link_static = $2;
  153. link_smart = $4;
  154. link_shared = $8;
  155. var
  156. s : string;
  157. begin
  158. s:='';
  159. if (m and link_allways)<>0 then
  160. s:=s+'always ';
  161. if (m and link_static)<>0 then
  162. s:=s+'static ';
  163. if (m and link_smart)<>0 then
  164. s:=s+'smart ';
  165. if (m and link_shared)<>0 then
  166. s:=s+'shared ';
  167. maskstr:=s;
  168. end;
  169. var
  170. s : string;
  171. m : longint;
  172. begin
  173. while not ppufile^.endofentry do
  174. begin
  175. s:=ppufile^.getstring;
  176. m:=ppufile^.getlongint;
  177. WriteLn(prefix,s,' (',maskstr(m),')');
  178. end;
  179. end;
  180. Procedure ReadContainer(const prefix:string);
  181. {
  182. Read a serie of strings and write to the screen starting every line
  183. with prefix
  184. }
  185. begin
  186. while not ppufile^.endofentry do
  187. WriteLn(prefix,ppufile^.getstring);
  188. end;
  189. Procedure ReadRef;
  190. begin
  191. if (verbose and v_browser)=0 then
  192. exit;
  193. while (not ppufile^.endofentry) and (not ppufile^.error) do
  194. Writeln(space,' - Refered : ',ppufile^.getword,', (',ppufile^.getlongint,',',ppufile^.getword,')');
  195. end;
  196. Procedure ReadPosInfo;
  197. begin
  198. Writeln(ppufile^.getword,' (',ppufile^.getlongint,',',ppufile^.getword,')');
  199. end;
  200. function readderef(const s:string):boolean;
  201. type
  202. tdereftype = (derefnil,derefaktrecordindex,derefaktstaticindex,derefunit,
  203. derefrecord,derefindex,dereflocal,derefpara);
  204. var
  205. b : tdereftype;
  206. begin
  207. readderef:=true;
  208. repeat
  209. b:=tdereftype(ppufile^.getbyte);
  210. case b of
  211. derefnil :
  212. begin
  213. writeln('nil');
  214. readderef:=false;
  215. break;
  216. end;
  217. derefaktrecordindex :
  218. begin
  219. writeln('AktRecord ',s,' ',ppufile^.getword);
  220. break;
  221. end;
  222. derefaktstaticindex :
  223. begin
  224. writeln('AktStatic ',s,' ',ppufile^.getword);
  225. break;
  226. end;
  227. derefunit :
  228. begin
  229. writeln('Unit ',ppufile^.getword);
  230. break;
  231. end;
  232. derefrecord :
  233. begin
  234. write('RecordDef ',ppufile^.getword,', ');
  235. end;
  236. derefpara :
  237. begin
  238. write('Parameter of procdef ',ppufile^.getword,', ');
  239. end;
  240. dereflocal :
  241. begin
  242. write('Local of procdef ',ppufile^.getword,', ');
  243. end;
  244. derefindex :
  245. begin
  246. write(s,' ',ppufile^.getword,', ');
  247. end;
  248. end;
  249. until false;
  250. end;
  251. function readdefref:boolean;
  252. begin
  253. readdefref:=readderef('Definition');
  254. end;
  255. function readsymref:boolean;
  256. begin
  257. readsymref:=readderef('Symbol');
  258. end;
  259. procedure read_abstract_proc_def;
  260. type
  261. tproccalloption=(pocall_none,
  262. pocall_clearstack, { Use IBM flat calling convention. (Used by GCC.) }
  263. pocall_leftright, { Push parameters from left to right }
  264. pocall_cdecl, { procedure uses C styled calling }
  265. pocall_register, { procedure uses register (fastcall) calling }
  266. pocall_stdcall, { procedure uses stdcall call }
  267. pocall_safecall, { safe call calling conventions }
  268. pocall_palmossyscall, { procedure is a PalmOS system call }
  269. pocall_system,
  270. pocall_inline, { Procedure is an assembler macro }
  271. pocall_internproc, { Procedure has compiler magic}
  272. pocall_internconst { procedure has constant evaluator intern }
  273. );
  274. tproccalloptions=set of tproccalloption;
  275. tproctypeoption=(potype_none,
  276. potype_proginit, { Program initialization }
  277. potype_unitinit, { unit initialization }
  278. potype_unitfinalize, { unit finalization }
  279. potype_constructor, { Procedure is a constructor }
  280. potype_destructor, { Procedure is a destructor }
  281. potype_operator { Procedure defines an operator }
  282. );
  283. tproctypeoptions=set of tproctypeoption;
  284. tprocoption=(po_none,
  285. po_classmethod, { class method }
  286. po_virtualmethod, { Procedure is a virtual method }
  287. po_abstractmethod, { Procedure is an abstract method }
  288. po_staticmethod, { static method }
  289. po_overridingmethod, { method with override directive }
  290. po_methodpointer, { method pointer, only in procvardef, also used for 'with object do' }
  291. po_containsself, { self is passed explicit to the compiler }
  292. po_interrupt, { Procedure is an interrupt handler }
  293. po_iocheck, { IO checking should be done after a call to the procedure }
  294. po_assembler, { Procedure is written in assembler }
  295. po_msgstr, { method for string message handling }
  296. po_msgint, { method for int message handling }
  297. po_exports, { Procedure has export directive (needed for OS/2) }
  298. po_external, { Procedure is external (in other object or lib)}
  299. po_savestdregs, { save std regs cdecl and stdcall need that ! }
  300. po_saveregisters { save all registers }
  301. );
  302. tprocoptions=set of tprocoption;
  303. type
  304. tproccallopt=record
  305. mask : tproccalloption;
  306. str : string[30];
  307. end;
  308. tproctypeopt=record
  309. mask : tproctypeoption;
  310. str : string[30];
  311. end;
  312. tprocopt=record
  313. mask : tprocoption;
  314. str : string[30];
  315. end;
  316. const
  317. proccallopts=12;
  318. proccallopt : array[1..proccallopts] of tproccallopt=(
  319. (mask:pocall_none; str:''),
  320. (mask:pocall_clearstack; str:'ClearStack'),
  321. (mask:pocall_leftright; str:'LeftRight'),
  322. (mask:pocall_cdecl; str:'Cdecl'),
  323. (mask:pocall_register; str:'Register'),
  324. (mask:pocall_stdcall; str:'StdCall'),
  325. (mask:pocall_safecall; str:'SafeCall'),
  326. (mask:pocall_palmossyscall;str:'PalmOSSysCall'),
  327. (mask:pocall_system; str:'System'),
  328. (mask:pocall_inline; str:'Inline'),
  329. (mask:pocall_internproc; str:'InternProc'),
  330. (mask:pocall_internconst; str:'InternConst')
  331. );
  332. proctypeopts=6;
  333. proctypeopt : array[1..proctypeopts] of tproctypeopt=(
  334. (mask:potype_proginit; str:'ProgInit'),
  335. (mask:potype_unitinit; str:'UnitInit'),
  336. (mask:potype_unitfinalize;str:'UnitFinalize'),
  337. (mask:potype_constructor; str:'Constructor'),
  338. (mask:potype_destructor; str:'Destructor'),
  339. (mask:potype_operator; str:'Operator')
  340. );
  341. procopts=16;
  342. procopt : array[1..procopts] of tprocopt=(
  343. (mask:po_classmethod; str:'ClassMethod'),
  344. (mask:po_virtualmethod; str:'VirtualMethod'),
  345. (mask:po_abstractmethod; str:'AbstractMethod'),
  346. (mask:po_staticmethod; str:'StaticMethod'),
  347. (mask:po_overridingmethod;str:'OverridingMethod'),
  348. (mask:po_methodpointer; str:'MethodPointer'),
  349. (mask:po_containsself; str:'ContainsSelf'),
  350. (mask:po_interrupt; str:'Interrupt'),
  351. (mask:po_iocheck; str:'IOCheck'),
  352. (mask:po_assembler; str:'Assembler'),
  353. (mask:po_msgstr; str:'MsgStr'),
  354. (mask:po_msgint; str:'MsgInt'),
  355. (mask:po_exports; str:'Exports'),
  356. (mask:po_external; str:'External'),
  357. (mask:po_savestdregs; str:'SaveStdRegs'),
  358. (mask:po_saveregisters; str:'SaveRegisters')
  359. );
  360. tvarspez : array[0..2] of string[5]=('Value','Const','Var ');
  361. var
  362. proctypeoption : tproctypeoption;
  363. proccalloptions : tproccalloptions;
  364. procoptions : tprocoptions;
  365. i,params : longint;
  366. first : boolean;
  367. begin
  368. write(space,' Return type : ');
  369. readdefref;
  370. writeln(space,' Fpu used : ',ppufile^.getbyte);
  371. proctypeoption:=tproctypeoption(ppufile^.getlongint);
  372. if proctypeoption<>potype_none then
  373. begin
  374. write(space,' TypeOption : ');
  375. first:=true;
  376. for i:=1to proctypeopts do
  377. if (proctypeopt[i].mask=proctypeoption) then
  378. begin
  379. if first then
  380. first:=false
  381. else
  382. write(', ');
  383. write(proctypeopt[i].str);
  384. end;
  385. writeln;
  386. end;
  387. ppufile^.getsmallset(proccalloptions);
  388. if proccalloptions<>[] then
  389. begin
  390. write(space,' CallOptions : ');
  391. first:=true;
  392. for i:=1to proccallopts do
  393. if (proccallopt[i].mask in proccalloptions) then
  394. begin
  395. if first then
  396. first:=false
  397. else
  398. write(', ');
  399. write(proccallopt[i].str);
  400. end;
  401. writeln;
  402. end;
  403. ppufile^.getsmallset(procoptions);
  404. if procoptions<>[] then
  405. begin
  406. write(space,' Options : ');
  407. first:=true;
  408. for i:=1to procopts do
  409. if (procopt[i].mask in procoptions) then
  410. begin
  411. if first then
  412. first:=false
  413. else
  414. write(', ');
  415. write(procopt[i].str);
  416. end;
  417. writeln;
  418. end;
  419. params:=ppufile^.getword;
  420. writeln(space,' Nr of parameters : ',params);
  421. if params>0 then
  422. begin
  423. repeat
  424. writeln(space,' - ',tvarspez[ppufile^.getbyte]);
  425. write (space,' def : ');
  426. readdefref;
  427. write (space,' defsym : ');
  428. readsymref;
  429. dec(params);
  430. until params=0;
  431. end;
  432. end;
  433. procedure readcommonsym(const s:string);
  434. type
  435. tsymoption=(sp_none,
  436. sp_public,
  437. sp_private,
  438. sp_published,
  439. sp_protected,
  440. sp_forwarddef,
  441. sp_static,
  442. sp_primary_typesym { this is for typesym, to know who is the primary symbol of a def }
  443. );
  444. tsymoptions=set of tsymoption;
  445. tsymopt=record
  446. mask : tsymoption;
  447. str : string[30];
  448. end;
  449. const
  450. symopts=7;
  451. symopt : array[1..symopts] of tsymopt=(
  452. (mask:sp_public; str:'Public'),
  453. (mask:sp_private; str:'Private'),
  454. (mask:sp_published; str:'Published'),
  455. (mask:sp_protected; str:'Protected'),
  456. (mask:sp_forwarddef; str:'ForwardDef'),
  457. (mask:sp_static; str:'Static'),
  458. (mask:sp_primary_typesym;str:'PrimaryTypeSym')
  459. );
  460. var
  461. symoptions : tsymoptions;
  462. i : longint;
  463. first : boolean;
  464. begin
  465. writeln(space,'** Symbol Nr. ',ppufile^.getword,' **');
  466. writeln(space,s,ppufile^.getstring);
  467. ppufile^.getsmallset(symoptions);
  468. if symoptions<>[] then
  469. begin
  470. write(space,' File Pos: ');
  471. readposinfo;
  472. write(space,' Options: ');
  473. first:=true;
  474. for i:=1to symopts do
  475. if (symopt[i].mask in symoptions) then
  476. begin
  477. if first then
  478. first:=false
  479. else
  480. write(', ');
  481. write(symopt[i].str);
  482. end;
  483. writeln;
  484. end;
  485. end;
  486. procedure readcommondef(const s:string);
  487. begin
  488. writeln(space,'** Definition Nr. ',ppufile^.getword,' **');
  489. writeln(space,s);
  490. write (space,' Type symbol : ');
  491. readsymref;
  492. end;
  493. {****************************************************************************
  494. Read Symbols Part
  495. ****************************************************************************}
  496. procedure readsymbols;
  497. procedure readpropsymlist;
  498. begin
  499. repeat
  500. if not readsymref then
  501. break;
  502. write(space,' ');
  503. until false;
  504. end;
  505. Const
  506. vo_is_C_var = 2;
  507. Type
  508. absolutetyp = (tovar,toasm,toaddr);
  509. tconsttype = (constord,conststring,constreal,constbool,constint,constchar,constseta);
  510. var
  511. b : byte;
  512. totalsyms,
  513. symcnt,
  514. i,j : longint;
  515. begin
  516. symcnt:=1;
  517. with ppufile^ do
  518. begin
  519. if space<>'' then
  520. Writeln(space,'-----------------------------');
  521. if readentry=ibstartsyms then
  522. begin
  523. totalsyms:=getlongint;
  524. Writeln(space,'Number of symbols: ',totalsyms);
  525. Writeln(space,'Symtable datasize: ',getlongint);
  526. end
  527. else
  528. begin
  529. totalsyms:=-1;
  530. Writeln('!! ibstartsym not found');
  531. end;
  532. repeat
  533. b:=readentry;
  534. if not (b in [iberror,ibendsyms]) then
  535. inc(symcnt);
  536. case b of
  537. ibunitsym :
  538. readcommonsym('Unit symbol ');
  539. iblabelsym :
  540. readcommonsym('Label symbol ');
  541. ibtypesym :
  542. begin
  543. readcommonsym('Type symbol ');
  544. write(space,' Definition: ');
  545. readdefref;
  546. end;
  547. ibprocsym :
  548. begin
  549. readcommonsym('Procedure symbol ');
  550. write(space,' Definition: ');
  551. readdefref;
  552. end;
  553. ibconstsym :
  554. begin
  555. readcommonsym('Constant symbol ');
  556. b:=getbyte;
  557. case tconsttype(b) of
  558. constord :
  559. begin
  560. write (space,' Definition : ');
  561. readdefref;
  562. writeln (space,' Value : ',getlongint)
  563. end;
  564. conststring :
  565. writeln(space,' Value : "'+getstring+'"');
  566. constreal :
  567. writeln(space,' Value : ',getreal);
  568. constbool :
  569. if getlongint<>0 then
  570. writeln (space,' Value : True')
  571. else
  572. writeln (space,' Value : False');
  573. constint :
  574. writeln(space,' Value : ',getlongint);
  575. constchar :
  576. writeln(space,' Value : "'+chr(getlongint)+'"');
  577. constseta :
  578. begin
  579. write (space,' Definition : ');
  580. readdefref;
  581. for i:=1to 4 do
  582. begin
  583. write (space,' Value : ');
  584. for j:=1to 8 do
  585. begin
  586. if j>1 then
  587. write(',');
  588. write(hexb(getbyte));
  589. end;
  590. writeln;
  591. end;
  592. end;
  593. else
  594. Writeln ('!! Invalid unit format : Invalid const type encountered: ',b);
  595. end;
  596. end;
  597. ibvarsym :
  598. begin
  599. readcommonsym('Variable symbol ');
  600. writeln(space,' Type: ',getbyte);
  601. if read_member then
  602. writeln(space,' Address: ',getlongint);
  603. write (space,' Definition: ');
  604. readdefref;
  605. write (space,' DefinitionSym: ');
  606. readsymref;
  607. i:=getlongint;
  608. writeln(space,' Options: ',i);
  609. if (i and vo_is_C_var)<>0 then
  610. writeln(space,' Mangledname: ',getstring);
  611. end;
  612. ibenumsym :
  613. begin
  614. readcommonsym('Enumeration symbol ');
  615. write (space,' Definition: ');
  616. readdefref;
  617. writeln(space,' Value: ',getlongint);
  618. end;
  619. ibsyssym :
  620. begin
  621. readcommonsym('Internal system symbol ');
  622. writeln(space,' Internal Nr: ',getlongint);
  623. end;
  624. ibtypedconstsym :
  625. begin
  626. readcommonsym('Typed constant ');
  627. write (space,' Definition: ');
  628. readdefref;
  629. write (space,' DefinitionSym: ');
  630. readsymref;
  631. writeln(space,' Label: ',getstring);
  632. writeln(space,' ReallyConst: ',(getbyte<>0));
  633. end;
  634. ibabsolutesym :
  635. begin
  636. readcommonsym('Absolute variable symbol ');
  637. writeln(space,' Type: ',getbyte);
  638. if read_member then
  639. writeln(space,' Address: ',getlongint);
  640. write (space,' Definition: ');
  641. readdefref;
  642. write (space,' DefinitionSym: ');
  643. readsymref;
  644. writeln(space,' Options: ',getbyte);
  645. Write (space,' Relocated to ');
  646. b:=getbyte;
  647. case absolutetyp(b) of
  648. tovar :
  649. Writeln('Name : ',getstring);
  650. toasm :
  651. Writeln('Assembler name : ',getstring);
  652. toaddr :
  653. begin
  654. Write('Address : ',getlongint);
  655. WriteLn(' (Far: ',getbyte<>0,')');
  656. end;
  657. else
  658. Writeln ('!! Invalid unit format : Invalid absolute type encountered: ',b);
  659. end;
  660. end;
  661. ibpropertysym :
  662. begin
  663. readcommonsym('Property ');
  664. write (space,' Definition: ');
  665. readdefref;
  666. writeln(space,' Options: ',getlongint);
  667. writeln(space,' Index: ',getlongint);
  668. writeln(space,' Default: ',getlongint);
  669. write (space,' Read symbol: ');
  670. readpropsymlist;
  671. write (space,' Write symbol: ');
  672. readpropsymlist;
  673. write (space,' Stored symbol: ');
  674. readpropsymlist;
  675. write (space,' Read Definition: ');
  676. readdefref;
  677. write (space,' Write Definition: ');
  678. readdefref;
  679. write (space,' Stored Definition: ');
  680. readdefref;
  681. write (space,' Index Definition: ');
  682. readdefref;
  683. end;
  684. ibfuncretsym :
  685. begin
  686. readcommonsym('Func return value ');
  687. write (space,' Definition: ');
  688. readdefref;
  689. writeln(space,' Address: ',getlongint);
  690. end;
  691. iberror :
  692. begin
  693. Writeln('!! Error in PPU');
  694. exit;
  695. end;
  696. ibendsyms :
  697. break;
  698. else
  699. WriteLn('!! Skipping unsupported PPU Entry in Symbols: ',b);
  700. end;
  701. if not EndOfEntry then
  702. Writeln('!! Entry has more information stored');
  703. until false;
  704. if (totalsyms<>-1) and (symcnt-1<>totalsyms) then
  705. Writeln('!! Only read ',symcnt-1,' of ',totalsyms,' symbols');
  706. end;
  707. end;
  708. {****************************************************************************
  709. Read defintions Part
  710. ****************************************************************************}
  711. procedure readdefinitions(start_read : boolean);
  712. type
  713. tsettype = (normset,smallset,varset);
  714. tbasetype = (uauto,uvoid,uchar,
  715. u8bit,u16bit,u32bit,
  716. s8bit,s16bit,s32bit,
  717. bool8bit,bool16bit,bool32bit,
  718. u64bit,s64bit);
  719. var
  720. b : byte;
  721. oldread_member : boolean;
  722. totaldefs,
  723. defcnt : longint;
  724. begin
  725. defcnt:=0;
  726. with ppufile^ do
  727. begin
  728. if space<>'' then
  729. Writeln(space,'-----------------------------');
  730. if not start_read then
  731. if readentry=ibstartdefs then
  732. begin
  733. totaldefs:=getlongint;
  734. Writeln(space,'Number of definitions: ',totaldefs);
  735. end
  736. else
  737. begin
  738. totaldefs:=-1;
  739. Writeln('!! ibstartdef not found');
  740. end;
  741. repeat
  742. b:=readentry;
  743. if not (b in [iberror,ibenddefs]) then
  744. inc(defcnt);
  745. case b of
  746. ibpointerdef :
  747. begin
  748. readcommondef('Pointer definition');
  749. write (space,' To Definition : ');
  750. readdefref;
  751. writeln(space,' Is Far : ',(getbyte<>0));
  752. end;
  753. iborddef :
  754. begin
  755. readcommondef('Ordinal definition');
  756. write (space,' Base type : ');
  757. b:=getbyte;
  758. case tbasetype(b) of
  759. uauto : writeln('uauto');
  760. uvoid : writeln('uvoid');
  761. uchar : writeln('uchar');
  762. u8bit : writeln('u8bit');
  763. u16bit : writeln('u16bit');
  764. u32bit : writeln('s32bit');
  765. s8bit : writeln('s8bit');
  766. s16bit : writeln('s16bit');
  767. s32bit : writeln('s32bit');
  768. bool8bit : writeln('bool8bit');
  769. bool16bit : writeln('bool16bit');
  770. bool32bit : writeln('bool32bit');
  771. u64bit : writeln('u64bit');
  772. s64bit : writeln('s64bit');
  773. else writeln('!! Warning: Invalid base type ',b);
  774. end;
  775. writeln(space,' Range : ',getlongint,' to ',getlongint);
  776. end;
  777. ibfloatdef :
  778. begin
  779. readcommondef('Float definition');
  780. writeln(space,' Float type : ',getbyte);
  781. end;
  782. ibarraydef :
  783. begin
  784. readcommondef('Array definition');
  785. write (space,' Element type : ');
  786. readdefref;
  787. write (space,' Range Type : ');
  788. readdefref;
  789. writeln(space,' Range : ',getlongint,' to ',getlongint);
  790. writeln(space,' Is Constructor : ',(getbyte<>0));
  791. end;
  792. ibprocdef :
  793. begin
  794. readcommondef('Procedure definition');
  795. read_abstract_proc_def;
  796. writeln(space,' Used Register : ',getbyte);
  797. writeln(space,' Mangled name : ',getstring);
  798. writeln(space,' Number : ',getlongint);
  799. write (space,' Next : ');
  800. readdefref;
  801. write (space,' Class : ');
  802. readdefref;
  803. write (space,' File Pos : ');
  804. readposinfo;
  805. end;
  806. ibprocvardef :
  807. begin
  808. readcommondef('Procedural type (ProcVar) definition');
  809. read_abstract_proc_def;
  810. end;
  811. ibshortstringdef :
  812. begin
  813. readcommondef('ShortString definition');
  814. writeln(space,' Length : ',getbyte);
  815. end;
  816. ibwidestringdef :
  817. begin
  818. readcommondef('WideString definition');
  819. writeln(space,' Length : ',getlongint);
  820. end;
  821. ibansistringdef :
  822. begin
  823. readcommondef('AnsiString definition');
  824. writeln(space,' Length : ',getlongint);
  825. end;
  826. iblongstringdef :
  827. begin
  828. readcommondef('Longstring definition');
  829. writeln(space,' Length : ',getlongint);
  830. end;
  831. ibrecorddef :
  832. begin
  833. readcommondef('Record definition');
  834. writeln(space,' Size : ',getlongint);
  835. {read the record definitions and symbols}
  836. space:=' '+space;
  837. oldread_member:=read_member;
  838. read_member:=true;
  839. readdefinitions(false);
  840. readsymbols;
  841. read_member:=oldread_member;
  842. Delete(space,1,4);
  843. end;
  844. ibobjectdef :
  845. begin
  846. readcommondef('Object/Class definition');
  847. writeln(space,' Size : ',getlongint);
  848. writeln(space,' Vmt offset : ',getlongint);
  849. writeln(space,' Name of Class : ',getstring);
  850. write(space, ' Ancestor Class : ');
  851. readdefref;
  852. writeln(space,' Options : ',getlongint);
  853. {read the record definitions and symbols}
  854. space:=' '+space;
  855. oldread_member:=read_member;
  856. read_member:=true;
  857. readdefinitions(false);
  858. readsymbols;
  859. read_member:=oldread_member;
  860. Delete(space,1,4);
  861. end;
  862. ibfiledef :
  863. begin
  864. ReadCommonDef('File definition');
  865. write (space,' Type : ');
  866. case getbyte of
  867. 0 : writeln('Text');
  868. 1 : begin
  869. write('Typed with definition ');
  870. readdefref;
  871. end;
  872. 2 : writeln('Untyped');
  873. end;
  874. end;
  875. ibformaldef :
  876. readcommondef('Generic Definition (void-typ)');
  877. ibenumdef :
  878. begin
  879. readcommondef('Enumeration type definition');
  880. write(space,'Base enumeration type : ');
  881. readdefref;
  882. writeln(space,' Smallest element : ',getlongint);
  883. writeln(space,' Largest element : ',getlongint);
  884. writeln(space,' Size : ',getlongint);
  885. end;
  886. ibclassrefdef :
  887. begin
  888. readcommondef('Class reference definition');
  889. write (space,' To definition : ');
  890. readdefref;
  891. end;
  892. ibsetdef :
  893. begin
  894. readcommondef('Set definition');
  895. write (space,' Element type : ');
  896. readdefref;
  897. b:=getbyte;
  898. case tsettype(b) of
  899. smallset : writeln(space,' Set with 32 Elements');
  900. normset : writeln(space,' Set with 256 Elements');
  901. varset : writeln(space,' Set with ',getlongint,' Elements');
  902. else writeln('!! Warning: Invalid set type ',b);
  903. end;
  904. end;
  905. iberror :
  906. begin
  907. Writeln('!! Error in PPU');
  908. exit;
  909. end;
  910. ibenddefs :
  911. break;
  912. else
  913. WriteLn('!! Skipping unsupported PPU Entry in definitions: ',b);
  914. end;
  915. if not EndOfEntry then
  916. Writeln('!! Entry has more information stored');
  917. until false;
  918. if (totaldefs<>-1) and (defcnt<>totaldefs) then
  919. Writeln('!! Only read ',defcnt,' of ',totaldefs,' definitions');
  920. end;
  921. end;
  922. {****************************************************************************
  923. Read General Part
  924. ****************************************************************************}
  925. procedure readinterface;
  926. var
  927. b : byte;
  928. sourcenumber,
  929. unitnumber : word;
  930. ucrc,uintfcrc : longint;
  931. begin
  932. with ppufile^ do
  933. begin
  934. repeat
  935. b:=readentry;
  936. case b of
  937. ibmodulename :
  938. Writeln('Module Name: ',getstring);
  939. ibsourcefiles :
  940. begin
  941. sourcenumber:=1;
  942. while not EndOfEntry do
  943. begin
  944. Writeln('Source file ',sourcenumber,' : ',getstring);
  945. inc(sourcenumber);
  946. end;
  947. end;
  948. ibusedmacros :
  949. begin
  950. while not EndOfEntry do
  951. begin
  952. Write('Conditional ',getstring);
  953. b:=getbyte;
  954. if boolean(b)=true then
  955. write(' defined at startup')
  956. else
  957. write(' not defined at startup');
  958. b:=getbyte;
  959. if boolean(b)=true then
  960. writeln(' was used')
  961. else
  962. writeln;
  963. end;
  964. end;
  965. ibloadunit :
  966. begin
  967. unitnumber:=1;
  968. while not EndOfEntry do
  969. begin
  970. write('Uses unit: ',getstring,' (Number: ',unitnumber,')');
  971. ucrc:=getlongint;
  972. uintfcrc:=getlongint;
  973. write(' (Crc: ',ucrc,', IntfcCrc: ',uintfcrc,')');
  974. if getbyte<>0 then
  975. writeln(' (interface)')
  976. else
  977. writeln(' (implementation)');
  978. inc(unitnumber);
  979. end;
  980. end;
  981. iblinkunitofiles :
  982. ReadLinkContainer('Link unit object file: ');
  983. iblinkunitstaticlibs :
  984. ReadLinkContainer('Link unit static lib: ');
  985. iblinkunitsharedlibs :
  986. ReadLinkContainer('Link unit shared lib: ');
  987. iblinkotherofiles :
  988. ReadLinkContainer('Link other object file: ');
  989. iblinkotherstaticlibs :
  990. ReadLinkContainer('Link other static lib: ');
  991. iblinkothersharedlibs :
  992. ReadLinkContainer('Link other shared lib: ');
  993. iberror :
  994. begin
  995. Writeln('Error in PPU');
  996. exit;
  997. end;
  998. ibendinterface :
  999. break;
  1000. else
  1001. WriteLn('!! Skipping unsupported PPU Entry in General Part: ',b);
  1002. end;
  1003. until false;
  1004. end;
  1005. end;
  1006. {****************************************************************************
  1007. Read Implementation Part
  1008. ****************************************************************************}
  1009. procedure readimplementation;
  1010. var
  1011. b : byte;
  1012. begin
  1013. with ppufile^ do
  1014. begin
  1015. repeat
  1016. b:=readentry;
  1017. case b of
  1018. iberror :
  1019. begin
  1020. Writeln('Error in PPU');
  1021. exit;
  1022. end;
  1023. ibendimplementation :
  1024. break;
  1025. else
  1026. WriteLn('!! Skipping unsupported PPU Entry in Implementation: ',b);
  1027. end;
  1028. until false;
  1029. end;
  1030. end;
  1031. {****************************************************************************
  1032. Read Browser Part
  1033. ****************************************************************************}
  1034. procedure readbrowser;
  1035. var
  1036. b : byte;
  1037. const indent : string = '';
  1038. begin
  1039. Writeln(indent,'Start of symtable browser');
  1040. indent:=indent+'**';
  1041. with ppufile^ do
  1042. begin
  1043. repeat
  1044. b:=readentry;
  1045. case b of
  1046. ibbeginsymtablebrowser :
  1047. { here we must read object and record symtables !! }
  1048. begin
  1049. indent:=indent+' ';
  1050. Writeln(indent,'Record/Object symtable');
  1051. readbrowser;
  1052. Indent:=Copy(Indent,1,Length(Indent)-2);
  1053. end;
  1054. ibsymref : begin
  1055. readsymref;
  1056. readref;
  1057. end;
  1058. ibdefref : begin
  1059. readdefref;
  1060. readref;
  1061. if (ppufile^.header.flags and uf_local_browser)<>0 then
  1062. begin
  1063. { parast and localst }
  1064. indent:=indent+' ';
  1065. Writeln(indent,'Parasymtable for function');
  1066. readdefinitions(false);
  1067. readsymbols;
  1068. b:=ppufile^.readentry;
  1069. if b=ibbeginsymtablebrowser then
  1070. readbrowser;
  1071. Writeln(indent,'Localsymtable for function');
  1072. readdefinitions(false);
  1073. readsymbols;
  1074. b:=ppufile^.readentry;
  1075. if b=ibbeginsymtablebrowser then
  1076. readbrowser;
  1077. Indent:=Copy(Indent,1,Length(Indent)-2);
  1078. end;
  1079. end;
  1080. iberror : begin
  1081. Writeln('Error in PPU');
  1082. exit;
  1083. end;
  1084. ibendsymtablebrowser : break;
  1085. else
  1086. begin
  1087. WriteLn('!! Skipping unsupported PPU Entry in Browser: ',b);
  1088. Halt;
  1089. end;
  1090. end;
  1091. until false;
  1092. end;
  1093. Indent:=Copy(Indent,1,Length(Indent)-2);
  1094. Writeln(Indent,'End of symtable browser');
  1095. end;
  1096. procedure dofile (filename : string);
  1097. var
  1098. b,unitindex : byte;
  1099. begin
  1100. { reset }
  1101. space:='';
  1102. defcnt:=0;
  1103. symcnt:=0;
  1104. { fix filename }
  1105. if pos('.',filename)=0 then
  1106. filename:=filename+'.ppu';
  1107. ppufile:=new(pppufile,Init(filename));
  1108. if not ppufile^.open then
  1109. begin
  1110. writeln ('IO-Error when opening : ',filename,', Skipping');
  1111. exit;
  1112. end;
  1113. { PPU File is open, check for PPU Id }
  1114. if not ppufile^.CheckPPUID then
  1115. begin
  1116. writeln(Filename,' : Not a valid PPU file, Skipping');
  1117. exit;
  1118. end;
  1119. { Check PPU Version }
  1120. Writeln('Analyzing ',filename,' (v',ppufile^.GetPPUVersion,')');
  1121. if ppufile^.GetPPUVersion<16 then
  1122. begin
  1123. writeln(Filename,' : Old PPU Formats (<v16) are not supported, Skipping');
  1124. exit;
  1125. end;
  1126. { Write PPU Header Information }
  1127. if (verbose and v_header)<>0 then
  1128. begin
  1129. Writeln;
  1130. Writeln('Header');
  1131. Writeln('-------');
  1132. with ppufile^.header do
  1133. begin
  1134. Writeln('Compiler version : ',hi(ppufile^.header.compiler and $ff),'.',lo(ppufile^.header.compiler));
  1135. WriteLn('Target processor : ',Cpu2Str(cpu));
  1136. WriteLn('Target operating system : ',Target2Str(target));
  1137. Writeln('Unit flags : ',PPUFlags2Str(flags));
  1138. Writeln('FileSize (w/o header) : ',size);
  1139. Writeln('Checksum : ',checksum);
  1140. Writeln('Interface Checksum : ',interface_checksum);
  1141. end;
  1142. end;
  1143. {read the general stuff}
  1144. if (verbose and v_interface)<>0 then
  1145. begin
  1146. Writeln;
  1147. Writeln('Interface section');
  1148. Writeln('------------------');
  1149. readinterface;
  1150. end
  1151. else
  1152. ppufile^.skipuntilentry(ibendinterface);
  1153. {read the definitions}
  1154. if (verbose and v_defs)<>0 then
  1155. begin
  1156. Writeln;
  1157. Writeln('Interface definitions');
  1158. Writeln('----------------------');
  1159. readdefinitions(false);
  1160. end
  1161. else
  1162. ppufile^.skipuntilentry(ibenddefs);
  1163. {read the symbols}
  1164. if (verbose and v_syms)<>0 then
  1165. begin
  1166. Writeln;
  1167. Writeln('Interface Symbols');
  1168. Writeln('------------------');
  1169. readsymbols;
  1170. end
  1171. else
  1172. ppufile^.skipuntilentry(ibendsyms);
  1173. {read the implementation stuff}
  1174. { Not used at the moment (PFV)
  1175. if (verbose and v_implementation)<>0 then
  1176. begin
  1177. Writeln;
  1178. Writeln('Implementation section');
  1179. Writeln('-----------------------');
  1180. readimplementation;
  1181. end
  1182. else}
  1183. ppufile^.skipuntilentry(ibendimplementation);
  1184. {read the static browser units stuff}
  1185. if (ppufile^.header.flags and uf_local_browser)<>0 then
  1186. begin
  1187. if (verbose and v_defs)<>0 then
  1188. begin
  1189. Writeln;
  1190. Writeln('Static definitions');
  1191. Writeln('----------------------');
  1192. readdefinitions(false);
  1193. end
  1194. else
  1195. ppufile^.skipuntilentry(ibenddefs);
  1196. {read the symbols}
  1197. if (verbose and v_syms)<>0 then
  1198. begin
  1199. Writeln;
  1200. Writeln('Static Symbols');
  1201. Writeln('------------------');
  1202. readsymbols;
  1203. end;
  1204. end;
  1205. {read the browser units stuff}
  1206. if (ppufile^.header.flags and uf_has_browser)<>0 then
  1207. begin
  1208. if (verbose and v_browser)<>0 then
  1209. begin
  1210. Writeln;
  1211. Writeln('Browser section');
  1212. Writeln('---------------');
  1213. UnitIndex:=0;
  1214. repeat
  1215. b:=ppufile^.readentry;
  1216. if b = ibendbrowser then break;
  1217. if b=ibbeginsymtablebrowser then
  1218. begin
  1219. Writeln('Unit ',UnitIndex);
  1220. readbrowser;
  1221. Inc(UnitIndex);
  1222. end
  1223. else
  1224. Writeln('Wrong end browser entry ',b,' should be ',ibendbrowser);
  1225. until false;
  1226. end;
  1227. end;
  1228. {read the static browser units stuff}
  1229. if (ppufile^.header.flags and uf_local_browser)<>0 then
  1230. begin
  1231. if (verbose and v_browser)<>0 then
  1232. begin
  1233. Writeln;
  1234. Writeln('Static browser section');
  1235. Writeln('---------------');
  1236. b:=ppufile^.readentry;
  1237. if b=ibbeginsymtablebrowser then
  1238. begin
  1239. Writeln('Unit ',UnitIndex);
  1240. readbrowser;
  1241. Inc(UnitIndex);
  1242. end
  1243. else
  1244. Writeln('Wrong end browser entry ',b,' should be ',ibendbrowser);
  1245. end;
  1246. end;
  1247. {shutdown ppufile}
  1248. ppufile^.close;
  1249. dispose(ppufile,done);
  1250. Writeln;
  1251. end;
  1252. procedure help;
  1253. begin
  1254. writeln('usage: ppudump [options] <filename1> <filename2>...');
  1255. writeln;
  1256. writeln('[options] can be:');
  1257. writeln(' -V<verbose> Set verbosity to <verbose>');
  1258. writeln(' H - Show header info');
  1259. writeln(' I - Show interface');
  1260. writeln(' M - Show implementation');
  1261. writeln(' S - Show interface symbols');
  1262. writeln(' D - Show interface definitions');
  1263. writeln(' B - Show browser info');
  1264. writeln(' A - Show all');
  1265. writeln(' -? This helpscreen');
  1266. halt;
  1267. end;
  1268. var
  1269. startpara,
  1270. nrfile,i : longint;
  1271. para : string;
  1272. begin
  1273. writeln(Title+' '+Version);
  1274. writeln(Copyright);
  1275. writeln;
  1276. if paramcount<1 then
  1277. begin
  1278. writeln('usage: dumpppu [options] <filename1> <filename2>...');
  1279. halt(1);
  1280. end;
  1281. { turn verbose on by default }
  1282. verbose:=v_all;
  1283. { read options }
  1284. startpara:=1;
  1285. while copy(paramstr(startpara),1,1)='-' do
  1286. begin
  1287. para:=paramstr(startpara);
  1288. case upcase(para[2]) of
  1289. 'V' : begin
  1290. verbose:=0;
  1291. for i:=3to length(para) do
  1292. case upcase(para[i]) of
  1293. 'H' : verbose:=verbose or v_header;
  1294. 'I' : verbose:=verbose or v_interface;
  1295. 'M' : verbose:=verbose or v_implementation;
  1296. 'D' : verbose:=verbose or v_defs;
  1297. 'S' : verbose:=verbose or v_syms;
  1298. 'B' : verbose:=verbose or v_browser;
  1299. 'A' : verbose:=verbose or v_all;
  1300. end;
  1301. end;
  1302. '?' : help;
  1303. end;
  1304. inc(startpara);
  1305. end;
  1306. { process files }
  1307. for nrfile:=startpara to paramcount do
  1308. dofile (paramstr(nrfile));
  1309. if has_errors then
  1310. Halt(1);
  1311. end.
  1312. {
  1313. $Log$
  1314. Revision 1.10 1999-11-08 14:06:45 florian
  1315. + indexref of propertysym is handle too now
  1316. Revision 1.9 1999/08/31 16:07:37 pierre
  1317. + support for writeusedmacros
  1318. Revision 1.8 1999/08/15 10:47:14 peter
  1319. * updates for new options
  1320. Revision 1.7 1999/08/13 21:25:35 peter
  1321. * updated flags
  1322. Revision 1.6 1999/07/27 23:45:29 peter
  1323. * updated for typesym writing
  1324. Revision 1.5 1999/07/05 12:32:40 florian
  1325. * new property ppu writing implemented
  1326. Revision 1.4 1999/07/03 00:25:44 peter
  1327. * 0.99.13
  1328. * new link support
  1329. Revision 1.3 1999/06/08 22:16:06 peter
  1330. * version 0.99.12
  1331. Revision 1.2 1999/05/14 17:52:04 peter
  1332. * new deref
  1333. Revision 1.1 1999/05/12 16:11:39 peter
  1334. * moved
  1335. Revision 1.31 1999/04/29 17:22:34 peter
  1336. * fixed property sym
  1337. Revision 1.30 1999/04/26 18:27:39 peter
  1338. * more updates
  1339. Revision 1.29 1999/04/26 13:30:44 peter
  1340. * support new unit format
  1341. Revision 1.28 1999/04/26 09:35:04 peter
  1342. * support for v16
  1343. Revision 1.27 1999/03/16 21:00:03 peter
  1344. * fixed varsym
  1345. Revision 1.26 1999/03/02 22:54:54 peter
  1346. * merged some of my code back which was changed after pierres commit
  1347. Revision 1.25 1999/03/02 14:21:44 pierre
  1348. * adapted to symtable changes mainly local browser
  1349. Revision 1.24 1999/03/02 13:48:16 peter
  1350. * better procoptions display and easy maintainance
  1351. * removed implementation section printing, becuase it's not used
  1352. * linkunitfiles support
  1353. Revision 1.23 1999/02/22 13:22:00 pierre
  1354. + static browser reading
  1355. Revision 1.22 1999/02/16 00:48:42 peter
  1356. * updated for new flags
  1357. Revision 1.21 1998/11/28 16:21:02 peter
  1358. + support for dll variables
  1359. Revision 1.20 1998/11/12 11:36:43 peter
  1360. * fixed target name
  1361. Revision 1.19 1998/11/04 10:17:42 peter
  1362. + const,var,value is written for parameters
  1363. Revision 1.18 1998/10/13 13:06:14 peter
  1364. * updated for new target enum
  1365. Revision 1.17 1998/09/25 09:51:53 peter
  1366. + symtable size and # of symbols
  1367. Revision 1.16 1998/09/24 23:24:11 peter
  1368. * small update to support ibstartdef
  1369. Revision 1.12 1998/09/21 08:45:28 pierre
  1370. + added vmt_offset in tobjectdef.write for fututre use
  1371. (first steps to have objects without vmt if no virtual !!)
  1372. + added fpu_used field for tabstractprocdef :
  1373. sets this level to 2 if the functions return with value in FPU
  1374. (is then set to correct value at parsing of implementation)
  1375. THIS MIGHT refuse some code with FPU expression too complex
  1376. that were accepted before and even in some cases
  1377. that don't overflow in fact
  1378. ( like if f : float; is a forward that finally in implementation
  1379. only uses one fpu register !!)
  1380. Nevertheless I think that it will improve security on
  1381. FPU operations !!
  1382. * most other changes only for UseBrowser code
  1383. (added symtable references for record and objects)
  1384. local switch for refs to args and local of each function
  1385. (static symtable still missing)
  1386. UseBrowser still not stable and probably broken by
  1387. the definition hash array !!
  1388. Revision 1.11 1998/09/18 08:01:42 pierre
  1389. + improvement on the usebrowser part
  1390. (does not work correctly for now)
  1391. Revision 1.10 1998/09/01 17:35:33 peter
  1392. * update for new po's
  1393. Revision 1.9 1998/09/01 12:46:52 peter
  1394. + enum savesize
  1395. Revision 1.8 1998/08/26 10:01:18 peter
  1396. + set support
  1397. Revision 1.7 1998/08/20 13:01:41 peter
  1398. + object_options, new enumdef
  1399. Revision 1.6 1998/08/17 10:26:28 peter
  1400. * updated for new shared/static style
  1401. Revision 1.5 1998/08/13 10:56:28 peter
  1402. * check if a whole entry is read
  1403. + support for constset
  1404. Revision 1.4 1998/08/11 15:31:44 peter
  1405. * write extended to ppu file
  1406. * new version 0.99.7
  1407. Revision 1.3 1998/07/10 10:59:17 peter
  1408. + m68k target support
  1409. Revision 1.2 1998/06/17 13:58:28 peter
  1410. + symbol/def nrs are now listed
  1411. Revision 1.1 1998/06/13 00:05:01 peter
  1412. + new util to dump v15+ ppu
  1413. }