ppudump.pp 44 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558
  1. {
  2. $Id$
  3. Copyright (c) 1995-98 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. end;
  682. ibfuncretsym :
  683. begin
  684. readcommonsym('Func return value ');
  685. write (space,' Definition: ');
  686. readdefref;
  687. writeln(space,' Address: ',getlongint);
  688. end;
  689. iberror :
  690. begin
  691. Writeln('!! Error in PPU');
  692. exit;
  693. end;
  694. ibendsyms :
  695. break;
  696. else
  697. WriteLn('!! Skipping unsupported PPU Entry in Symbols: ',b);
  698. end;
  699. if not EndOfEntry then
  700. Writeln('!! Entry has more information stored');
  701. until false;
  702. if (totalsyms<>-1) and (symcnt-1<>totalsyms) then
  703. Writeln('!! Only read ',symcnt-1,' of ',totalsyms,' symbols');
  704. end;
  705. end;
  706. {****************************************************************************
  707. Read defintions Part
  708. ****************************************************************************}
  709. procedure readdefinitions(start_read : boolean);
  710. type
  711. tsettype = (normset,smallset,varset);
  712. tbasetype = (uauto,uvoid,uchar,
  713. u8bit,u16bit,u32bit,
  714. s8bit,s16bit,s32bit,
  715. bool8bit,bool16bit,bool32bit,
  716. u64bit,s64bit);
  717. var
  718. b : byte;
  719. oldread_member : boolean;
  720. totaldefs,
  721. defcnt : longint;
  722. begin
  723. defcnt:=0;
  724. with ppufile^ do
  725. begin
  726. if space<>'' then
  727. Writeln(space,'-----------------------------');
  728. if not start_read then
  729. if readentry=ibstartdefs then
  730. begin
  731. totaldefs:=getlongint;
  732. Writeln(space,'Number of definitions: ',totaldefs);
  733. end
  734. else
  735. begin
  736. totaldefs:=-1;
  737. Writeln('!! ibstartdef not found');
  738. end;
  739. repeat
  740. b:=readentry;
  741. if not (b in [iberror,ibenddefs]) then
  742. inc(defcnt);
  743. case b of
  744. ibpointerdef :
  745. begin
  746. readcommondef('Pointer definition');
  747. write (space,' To Definition : ');
  748. readdefref;
  749. writeln(space,' Is Far : ',(getbyte<>0));
  750. end;
  751. iborddef :
  752. begin
  753. readcommondef('Ordinal definition');
  754. write (space,' Base type : ');
  755. b:=getbyte;
  756. case tbasetype(b) of
  757. uauto : writeln('uauto');
  758. uvoid : writeln('uvoid');
  759. uchar : writeln('uchar');
  760. u8bit : writeln('u8bit');
  761. u16bit : writeln('u16bit');
  762. u32bit : writeln('s32bit');
  763. s8bit : writeln('s8bit');
  764. s16bit : writeln('s16bit');
  765. s32bit : writeln('s32bit');
  766. bool8bit : writeln('bool8bit');
  767. bool16bit : writeln('bool16bit');
  768. bool32bit : writeln('bool32bit');
  769. u64bit : writeln('u64bit');
  770. s64bit : writeln('s64bit');
  771. else writeln('!! Warning: Invalid base type ',b);
  772. end;
  773. writeln(space,' Range : ',getlongint,' to ',getlongint);
  774. end;
  775. ibfloatdef :
  776. begin
  777. readcommondef('Float definition');
  778. writeln(space,' Float type : ',getbyte);
  779. end;
  780. ibarraydef :
  781. begin
  782. readcommondef('Array definition');
  783. write (space,' Element type : ');
  784. readdefref;
  785. write (space,' Range Type : ');
  786. readdefref;
  787. writeln(space,' Range : ',getlongint,' to ',getlongint);
  788. writeln(space,' Is Constructor : ',(getbyte<>0));
  789. end;
  790. ibprocdef :
  791. begin
  792. readcommondef('Procedure definition');
  793. read_abstract_proc_def;
  794. writeln(space,' Used Register : ',getbyte);
  795. writeln(space,' Mangled name : ',getstring);
  796. writeln(space,' Number : ',getlongint);
  797. write (space,' Next : ');
  798. readdefref;
  799. write (space,' Class : ');
  800. readdefref;
  801. write (space,' File Pos : ');
  802. readposinfo;
  803. end;
  804. ibprocvardef :
  805. begin
  806. readcommondef('Procedural type (ProcVar) definition');
  807. read_abstract_proc_def;
  808. end;
  809. ibshortstringdef :
  810. begin
  811. readcommondef('ShortString definition');
  812. writeln(space,' Length : ',getbyte);
  813. end;
  814. ibwidestringdef :
  815. begin
  816. readcommondef('WideString definition');
  817. writeln(space,' Length : ',getlongint);
  818. end;
  819. ibansistringdef :
  820. begin
  821. readcommondef('AnsiString definition');
  822. writeln(space,' Length : ',getlongint);
  823. end;
  824. iblongstringdef :
  825. begin
  826. readcommondef('Longstring definition');
  827. writeln(space,' Length : ',getlongint);
  828. end;
  829. ibrecorddef :
  830. begin
  831. readcommondef('Record definition');
  832. writeln(space,' Size : ',getlongint);
  833. {read the record definitions and symbols}
  834. space:=' '+space;
  835. oldread_member:=read_member;
  836. read_member:=true;
  837. readdefinitions(false);
  838. readsymbols;
  839. read_member:=oldread_member;
  840. Delete(space,1,4);
  841. end;
  842. ibobjectdef :
  843. begin
  844. readcommondef('Object/Class definition');
  845. writeln(space,' Size : ',getlongint);
  846. writeln(space,' Vmt offset : ',getlongint);
  847. writeln(space,' Name of Class : ',getstring);
  848. write(space, ' Ancestor Class : ');
  849. readdefref;
  850. writeln(space,' Options : ',getlongint);
  851. {read the record definitions and symbols}
  852. space:=' '+space;
  853. oldread_member:=read_member;
  854. read_member:=true;
  855. readdefinitions(false);
  856. readsymbols;
  857. read_member:=oldread_member;
  858. Delete(space,1,4);
  859. end;
  860. ibfiledef :
  861. begin
  862. ReadCommonDef('File definition');
  863. write (space,' Type : ');
  864. case getbyte of
  865. 0 : writeln('Text');
  866. 1 : begin
  867. write('Typed with definition ');
  868. readdefref;
  869. end;
  870. 2 : writeln('Untyped');
  871. end;
  872. end;
  873. ibformaldef :
  874. readcommondef('Generic Definition (void-typ)');
  875. ibenumdef :
  876. begin
  877. readcommondef('Enumeration type definition');
  878. write(space,'Base enumeration type : ');
  879. readdefref;
  880. writeln(space,' Smallest element : ',getlongint);
  881. writeln(space,' Largest element : ',getlongint);
  882. writeln(space,' Size : ',getlongint);
  883. end;
  884. ibclassrefdef :
  885. begin
  886. readcommondef('Class reference definition');
  887. write (space,' To definition : ');
  888. readdefref;
  889. end;
  890. ibsetdef :
  891. begin
  892. readcommondef('Set definition');
  893. write (space,' Element type : ');
  894. readdefref;
  895. b:=getbyte;
  896. case tsettype(b) of
  897. smallset : writeln(space,' Set with 32 Elements');
  898. normset : writeln(space,' Set with 256 Elements');
  899. varset : writeln(space,' Set with ',getlongint,' Elements');
  900. else writeln('!! Warning: Invalid set type ',b);
  901. end;
  902. end;
  903. iberror :
  904. begin
  905. Writeln('!! Error in PPU');
  906. exit;
  907. end;
  908. ibenddefs :
  909. break;
  910. else
  911. WriteLn('!! Skipping unsupported PPU Entry in definitions: ',b);
  912. end;
  913. if not EndOfEntry then
  914. Writeln('!! Entry has more information stored');
  915. until false;
  916. if (totaldefs<>-1) and (defcnt<>totaldefs) then
  917. Writeln('!! Only read ',defcnt,' of ',totaldefs,' definitions');
  918. end;
  919. end;
  920. {****************************************************************************
  921. Read General Part
  922. ****************************************************************************}
  923. procedure readinterface;
  924. var
  925. b : byte;
  926. sourcenumber,
  927. unitnumber : word;
  928. ucrc,uintfcrc : longint;
  929. begin
  930. with ppufile^ do
  931. begin
  932. repeat
  933. b:=readentry;
  934. case b of
  935. ibmodulename :
  936. Writeln('Module Name: ',getstring);
  937. ibsourcefiles :
  938. begin
  939. sourcenumber:=1;
  940. while not EndOfEntry do
  941. begin
  942. Writeln('Source file ',sourcenumber,' : ',getstring);
  943. inc(sourcenumber);
  944. end;
  945. end;
  946. ibusedmacros :
  947. begin
  948. while not EndOfEntry do
  949. begin
  950. Write('Conditional ',getstring);
  951. b:=getbyte;
  952. if boolean(b)=true then
  953. write(' defined at startup')
  954. else
  955. write(' not defined at startup');
  956. b:=getbyte;
  957. if boolean(b)=true then
  958. writeln(' was used')
  959. else
  960. writeln;
  961. end;
  962. end;
  963. ibloadunit :
  964. begin
  965. unitnumber:=1;
  966. while not EndOfEntry do
  967. begin
  968. write('Uses unit: ',getstring,' (Number: ',unitnumber,')');
  969. ucrc:=getlongint;
  970. uintfcrc:=getlongint;
  971. write(' (Crc: ',ucrc,', IntfcCrc: ',uintfcrc,')');
  972. if getbyte<>0 then
  973. writeln(' (interface)')
  974. else
  975. writeln(' (implementation)');
  976. inc(unitnumber);
  977. end;
  978. end;
  979. iblinkunitofiles :
  980. ReadLinkContainer('Link unit object file: ');
  981. iblinkunitstaticlibs :
  982. ReadLinkContainer('Link unit static lib: ');
  983. iblinkunitsharedlibs :
  984. ReadLinkContainer('Link unit shared lib: ');
  985. iblinkotherofiles :
  986. ReadLinkContainer('Link other object file: ');
  987. iblinkotherstaticlibs :
  988. ReadLinkContainer('Link other static lib: ');
  989. iblinkothersharedlibs :
  990. ReadLinkContainer('Link other shared lib: ');
  991. iberror :
  992. begin
  993. Writeln('Error in PPU');
  994. exit;
  995. end;
  996. ibendinterface :
  997. break;
  998. else
  999. WriteLn('!! Skipping unsupported PPU Entry in General Part: ',b);
  1000. end;
  1001. until false;
  1002. end;
  1003. end;
  1004. {****************************************************************************
  1005. Read Implementation Part
  1006. ****************************************************************************}
  1007. procedure readimplementation;
  1008. var
  1009. b : byte;
  1010. begin
  1011. with ppufile^ do
  1012. begin
  1013. repeat
  1014. b:=readentry;
  1015. case b of
  1016. iberror :
  1017. begin
  1018. Writeln('Error in PPU');
  1019. exit;
  1020. end;
  1021. ibendimplementation :
  1022. break;
  1023. else
  1024. WriteLn('!! Skipping unsupported PPU Entry in Implementation: ',b);
  1025. end;
  1026. until false;
  1027. end;
  1028. end;
  1029. {****************************************************************************
  1030. Read Browser Part
  1031. ****************************************************************************}
  1032. procedure readbrowser;
  1033. var
  1034. b : byte;
  1035. const indent : string = '';
  1036. begin
  1037. Writeln(indent,'Start of symtable browser');
  1038. indent:=indent+'**';
  1039. with ppufile^ do
  1040. begin
  1041. repeat
  1042. b:=readentry;
  1043. case b of
  1044. ibbeginsymtablebrowser :
  1045. { here we must read object and record symtables !! }
  1046. begin
  1047. indent:=indent+' ';
  1048. Writeln(indent,'Record/Object symtable');
  1049. readbrowser;
  1050. Indent:=Copy(Indent,1,Length(Indent)-2);
  1051. end;
  1052. ibsymref : begin
  1053. readsymref;
  1054. readref;
  1055. end;
  1056. ibdefref : begin
  1057. readdefref;
  1058. readref;
  1059. if (ppufile^.header.flags and uf_local_browser)<>0 then
  1060. begin
  1061. { parast and localst }
  1062. indent:=indent+' ';
  1063. Writeln(indent,'Parasymtable for function');
  1064. readdefinitions(false);
  1065. readsymbols;
  1066. b:=ppufile^.readentry;
  1067. if b=ibbeginsymtablebrowser then
  1068. readbrowser;
  1069. Writeln(indent,'Localsymtable for function');
  1070. readdefinitions(false);
  1071. readsymbols;
  1072. b:=ppufile^.readentry;
  1073. if b=ibbeginsymtablebrowser then
  1074. readbrowser;
  1075. Indent:=Copy(Indent,1,Length(Indent)-2);
  1076. end;
  1077. end;
  1078. iberror : begin
  1079. Writeln('Error in PPU');
  1080. exit;
  1081. end;
  1082. ibendsymtablebrowser : break;
  1083. else
  1084. begin
  1085. WriteLn('!! Skipping unsupported PPU Entry in Browser: ',b);
  1086. Halt;
  1087. end;
  1088. end;
  1089. until false;
  1090. end;
  1091. Indent:=Copy(Indent,1,Length(Indent)-2);
  1092. Writeln(Indent,'End of symtable browser');
  1093. end;
  1094. procedure dofile (filename : string);
  1095. var
  1096. b,unitindex : byte;
  1097. begin
  1098. { reset }
  1099. space:='';
  1100. defcnt:=0;
  1101. symcnt:=0;
  1102. { fix filename }
  1103. if pos('.',filename)=0 then
  1104. filename:=filename+'.ppu';
  1105. ppufile:=new(pppufile,Init(filename));
  1106. if not ppufile^.open then
  1107. begin
  1108. writeln ('IO-Error when opening : ',filename,', Skipping');
  1109. exit;
  1110. end;
  1111. { PPU File is open, check for PPU Id }
  1112. if not ppufile^.CheckPPUID then
  1113. begin
  1114. writeln(Filename,' : Not a valid PPU file, Skipping');
  1115. exit;
  1116. end;
  1117. { Check PPU Version }
  1118. Writeln('Analyzing ',filename,' (v',ppufile^.GetPPUVersion,')');
  1119. if ppufile^.GetPPUVersion<16 then
  1120. begin
  1121. writeln(Filename,' : Old PPU Formats (<v16) are not supported, Skipping');
  1122. exit;
  1123. end;
  1124. { Write PPU Header Information }
  1125. if (verbose and v_header)<>0 then
  1126. begin
  1127. Writeln;
  1128. Writeln('Header');
  1129. Writeln('-------');
  1130. with ppufile^.header do
  1131. begin
  1132. Writeln('Compiler version : ',hi(ppufile^.header.compiler and $ff),'.',lo(ppufile^.header.compiler));
  1133. WriteLn('Target processor : ',Cpu2Str(cpu));
  1134. WriteLn('Target operating system : ',Target2Str(target));
  1135. Writeln('Unit flags : ',PPUFlags2Str(flags));
  1136. Writeln('FileSize (w/o header) : ',size);
  1137. Writeln('Checksum : ',checksum);
  1138. Writeln('Interface Checksum : ',interface_checksum);
  1139. end;
  1140. end;
  1141. {read the general stuff}
  1142. if (verbose and v_interface)<>0 then
  1143. begin
  1144. Writeln;
  1145. Writeln('Interface section');
  1146. Writeln('------------------');
  1147. readinterface;
  1148. end
  1149. else
  1150. ppufile^.skipuntilentry(ibendinterface);
  1151. {read the definitions}
  1152. if (verbose and v_defs)<>0 then
  1153. begin
  1154. Writeln;
  1155. Writeln('Interface definitions');
  1156. Writeln('----------------------');
  1157. readdefinitions(false);
  1158. end
  1159. else
  1160. ppufile^.skipuntilentry(ibenddefs);
  1161. {read the symbols}
  1162. if (verbose and v_syms)<>0 then
  1163. begin
  1164. Writeln;
  1165. Writeln('Interface Symbols');
  1166. Writeln('------------------');
  1167. readsymbols;
  1168. end
  1169. else
  1170. ppufile^.skipuntilentry(ibendsyms);
  1171. {read the implementation stuff}
  1172. { Not used at the moment (PFV)
  1173. if (verbose and v_implementation)<>0 then
  1174. begin
  1175. Writeln;
  1176. Writeln('Implementation section');
  1177. Writeln('-----------------------');
  1178. readimplementation;
  1179. end
  1180. else}
  1181. ppufile^.skipuntilentry(ibendimplementation);
  1182. {read the static browser units stuff}
  1183. if (ppufile^.header.flags and uf_local_browser)<>0 then
  1184. begin
  1185. if (verbose and v_defs)<>0 then
  1186. begin
  1187. Writeln;
  1188. Writeln('Static definitions');
  1189. Writeln('----------------------');
  1190. readdefinitions(false);
  1191. end
  1192. else
  1193. ppufile^.skipuntilentry(ibenddefs);
  1194. {read the symbols}
  1195. if (verbose and v_syms)<>0 then
  1196. begin
  1197. Writeln;
  1198. Writeln('Static Symbols');
  1199. Writeln('------------------');
  1200. readsymbols;
  1201. end;
  1202. end;
  1203. {read the browser units stuff}
  1204. if (ppufile^.header.flags and uf_has_browser)<>0 then
  1205. begin
  1206. if (verbose and v_browser)<>0 then
  1207. begin
  1208. Writeln;
  1209. Writeln('Browser section');
  1210. Writeln('---------------');
  1211. UnitIndex:=0;
  1212. repeat
  1213. b:=ppufile^.readentry;
  1214. if b = ibendbrowser then break;
  1215. if b=ibbeginsymtablebrowser then
  1216. begin
  1217. Writeln('Unit ',UnitIndex);
  1218. readbrowser;
  1219. Inc(UnitIndex);
  1220. end
  1221. else
  1222. Writeln('Wrong end browser entry ',b,' should be ',ibendbrowser);
  1223. until false;
  1224. end;
  1225. end;
  1226. {read the static browser units stuff}
  1227. if (ppufile^.header.flags and uf_local_browser)<>0 then
  1228. begin
  1229. if (verbose and v_browser)<>0 then
  1230. begin
  1231. Writeln;
  1232. Writeln('Static browser section');
  1233. Writeln('---------------');
  1234. b:=ppufile^.readentry;
  1235. if b=ibbeginsymtablebrowser then
  1236. begin
  1237. Writeln('Unit ',UnitIndex);
  1238. readbrowser;
  1239. Inc(UnitIndex);
  1240. end
  1241. else
  1242. Writeln('Wrong end browser entry ',b,' should be ',ibendbrowser);
  1243. end;
  1244. end;
  1245. {shutdown ppufile}
  1246. ppufile^.close;
  1247. dispose(ppufile,done);
  1248. Writeln;
  1249. end;
  1250. procedure help;
  1251. begin
  1252. writeln('usage: ppudump [options] <filename1> <filename2>...');
  1253. writeln;
  1254. writeln('[options] can be:');
  1255. writeln(' -V<verbose> Set verbosity to <verbose>');
  1256. writeln(' H - Show header info');
  1257. writeln(' I - Show interface');
  1258. writeln(' M - Show implementation');
  1259. writeln(' S - Show interface symbols');
  1260. writeln(' D - Show interface definitions');
  1261. writeln(' B - Show browser info');
  1262. writeln(' A - Show all');
  1263. writeln(' -? This helpscreen');
  1264. halt;
  1265. end;
  1266. var
  1267. startpara,
  1268. nrfile,i : longint;
  1269. para : string;
  1270. begin
  1271. writeln(Title+' '+Version);
  1272. writeln(Copyright);
  1273. writeln;
  1274. if paramcount<1 then
  1275. begin
  1276. writeln('usage: dumpppu [options] <filename1> <filename2>...');
  1277. halt(1);
  1278. end;
  1279. { turn verbose on by default }
  1280. verbose:=v_all;
  1281. { read options }
  1282. startpara:=1;
  1283. while copy(paramstr(startpara),1,1)='-' do
  1284. begin
  1285. para:=paramstr(startpara);
  1286. case upcase(para[2]) of
  1287. 'V' : begin
  1288. verbose:=0;
  1289. for i:=3to length(para) do
  1290. case upcase(para[i]) of
  1291. 'H' : verbose:=verbose or v_header;
  1292. 'I' : verbose:=verbose or v_interface;
  1293. 'M' : verbose:=verbose or v_implementation;
  1294. 'D' : verbose:=verbose or v_defs;
  1295. 'S' : verbose:=verbose or v_syms;
  1296. 'B' : verbose:=verbose or v_browser;
  1297. 'A' : verbose:=verbose or v_all;
  1298. end;
  1299. end;
  1300. '?' : help;
  1301. end;
  1302. inc(startpara);
  1303. end;
  1304. { process files }
  1305. for nrfile:=startpara to paramcount do
  1306. dofile (paramstr(nrfile));
  1307. if has_errors then
  1308. Halt(1);
  1309. end.
  1310. {
  1311. $Log$
  1312. Revision 1.9 1999-08-31 16:07:37 pierre
  1313. + support for writeusedmacros
  1314. Revision 1.8 1999/08/15 10:47:14 peter
  1315. * updates for new options
  1316. Revision 1.7 1999/08/13 21:25:35 peter
  1317. * updated flags
  1318. Revision 1.6 1999/07/27 23:45:29 peter
  1319. * updated for typesym writing
  1320. Revision 1.5 1999/07/05 12:32:40 florian
  1321. * new property ppu writing implemented
  1322. Revision 1.4 1999/07/03 00:25:44 peter
  1323. * 0.99.13
  1324. * new link support
  1325. Revision 1.3 1999/06/08 22:16:06 peter
  1326. * version 0.99.12
  1327. Revision 1.2 1999/05/14 17:52:04 peter
  1328. * new deref
  1329. Revision 1.1 1999/05/12 16:11:39 peter
  1330. * moved
  1331. Revision 1.31 1999/04/29 17:22:34 peter
  1332. * fixed property sym
  1333. Revision 1.30 1999/04/26 18:27:39 peter
  1334. * more updates
  1335. Revision 1.29 1999/04/26 13:30:44 peter
  1336. * support new unit format
  1337. Revision 1.28 1999/04/26 09:35:04 peter
  1338. * support for v16
  1339. Revision 1.27 1999/03/16 21:00:03 peter
  1340. * fixed varsym
  1341. Revision 1.26 1999/03/02 22:54:54 peter
  1342. * merged some of my code back which was changed after pierres commit
  1343. Revision 1.25 1999/03/02 14:21:44 pierre
  1344. * adapted to symtable changes mainly local browser
  1345. Revision 1.24 1999/03/02 13:48:16 peter
  1346. * better procoptions display and easy maintainance
  1347. * removed implementation section printing, becuase it's not used
  1348. * linkunitfiles support
  1349. Revision 1.23 1999/02/22 13:22:00 pierre
  1350. + static browser reading
  1351. Revision 1.22 1999/02/16 00:48:42 peter
  1352. * updated for new flags
  1353. Revision 1.21 1998/11/28 16:21:02 peter
  1354. + support for dll variables
  1355. Revision 1.20 1998/11/12 11:36:43 peter
  1356. * fixed target name
  1357. Revision 1.19 1998/11/04 10:17:42 peter
  1358. + const,var,value is written for parameters
  1359. Revision 1.18 1998/10/13 13:06:14 peter
  1360. * updated for new target enum
  1361. Revision 1.17 1998/09/25 09:51:53 peter
  1362. + symtable size and # of symbols
  1363. Revision 1.16 1998/09/24 23:24:11 peter
  1364. * small update to support ibstartdef
  1365. Revision 1.12 1998/09/21 08:45:28 pierre
  1366. + added vmt_offset in tobjectdef.write for fututre use
  1367. (first steps to have objects without vmt if no virtual !!)
  1368. + added fpu_used field for tabstractprocdef :
  1369. sets this level to 2 if the functions return with value in FPU
  1370. (is then set to correct value at parsing of implementation)
  1371. THIS MIGHT refuse some code with FPU expression too complex
  1372. that were accepted before and even in some cases
  1373. that don't overflow in fact
  1374. ( like if f : float; is a forward that finally in implementation
  1375. only uses one fpu register !!)
  1376. Nevertheless I think that it will improve security on
  1377. FPU operations !!
  1378. * most other changes only for UseBrowser code
  1379. (added symtable references for record and objects)
  1380. local switch for refs to args and local of each function
  1381. (static symtable still missing)
  1382. UseBrowser still not stable and probably broken by
  1383. the definition hash array !!
  1384. Revision 1.11 1998/09/18 08:01:42 pierre
  1385. + improvement on the usebrowser part
  1386. (does not work correctly for now)
  1387. Revision 1.10 1998/09/01 17:35:33 peter
  1388. * update for new po's
  1389. Revision 1.9 1998/09/01 12:46:52 peter
  1390. + enum savesize
  1391. Revision 1.8 1998/08/26 10:01:18 peter
  1392. + set support
  1393. Revision 1.7 1998/08/20 13:01:41 peter
  1394. + object_options, new enumdef
  1395. Revision 1.6 1998/08/17 10:26:28 peter
  1396. * updated for new shared/static style
  1397. Revision 1.5 1998/08/13 10:56:28 peter
  1398. * check if a whole entry is read
  1399. + support for constset
  1400. Revision 1.4 1998/08/11 15:31:44 peter
  1401. * write extended to ppu file
  1402. * new version 0.99.7
  1403. Revision 1.3 1998/07/10 10:59:17 peter
  1404. + m68k target support
  1405. Revision 1.2 1998/06/17 13:58:28 peter
  1406. + symbol/def nrs are now listed
  1407. Revision 1.1 1998/06/13 00:05:01 peter
  1408. + new util to dump v15+ ppu
  1409. }