ppudump.pp 45 KB

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