ppudump.pp 43 KB

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