ChangeLog 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716
  1. 27-May-88 Dick Grune (dick) at dick
  2. Testing with the UNIX system call tester by Leonie van der Voort
  3. revealed a few errors: when length was negative in a call of read
  4. or write, funny values were passed to Malloc; the size of the
  5. elements in the mtime/atime array passed to a call of utime was
  6. wsize rather than INT4SIZE, as it probably should have been.
  7. 25-May-88 Dick Grune (dick) at dick
  8. It is just too much of a drag to be able to unstack even the last
  9. RSB, the one that contains the initial setting of the machine.
  10. newLB has to be patched, and now it seems that also newPC has to
  11. make an exeception for this case. We now don't unstack the
  12. original RSB.
  13. 19-May-88 Dick Grune (dick) at dick
  14. We now also dump the Function Return Area, when giving a stack
  15. dump.
  16. 17-May-88 Dick Grune (dick) at dick
  17. Segment checking for pointers should also be done for subtraction,
  18. and give a different warning.
  19. 16-May-88 Dick Grune (dick) at dick
  20. The implementation of the MON call 'exec' was sloppy about the
  21. buffers used: all strings were assumed to have a maximum length of
  22. 128, and the maximum number of args or environ entries was built
  23. in. We now scan the whole works to determine the size.
  24. 16-May-88 Dick Grune (dick) at dick
  25. A stack dump with given size would look funny if the size was large
  26. than the original stack, or when the dump happened to start in the
  27. middle of a RSB.
  28. 14-May-88 Dick Grune (dick) at dick
  29. Rethinking the start-up procedure has resulted in the removal of the
  30. flag LB_def and the RSB is now stacked and unstacked in one blow.
  31. LB = ML + 1 is now a special case.
  32. 11-May-88 Dick Grune (dick) at dick
  33. Code handling the Function Return Area was spread over a number of
  34. files; since there was already an include file fra.h, I made a file
  35. fra.c. Likewise for alloc.[ch]
  36. 10-May-88 Dick Grune (dick) at dick
  37. The whole segment-checking stuff is now concentrated in segment.c
  38. (and made correct!)
  39. 9-May-88 Dick Grune (dick) at dick
  40. Things would be a lot simpler if LB and AB and SP could start from
  41. ML+1, but they cannot because ML+1 gives overflow. So we now set ML
  42. to the highest word boundary minus 1.
  43. 8-May-88 Dick Grune (dick) at dick
  44. The whole business of deriving AB from LB every time you need it is
  45. unnatural: it is a separate register in its own right and
  46. recalculation is only possible since we happen to have a linear
  47. stack implementation. -> a normal register in the EM machine, set
  48. in newLB().
  49. 7-May-88 Dick Grune (dick) at dick
  50. In the non-checking version it did not even check for bad proc
  51. idfs, actions on double words with wsize == 4, etc., in text.h. It
  52. now checks.
  53. 7-May-88 Dick Grune (dick) at dick
  54. When a trap occurs it is often not at all clear why it happened;
  55. e.g., the trap ESTACK may have several causes except stack
  56. overflow: setting SP to an odd value, setting LB to a place where
  57. there is no RSB, and so on. Now all such traps are preceded by a
  58. warning; the combined action is written as wtrap(W..., E...)
  59. with W... the warning number and E... the trap number.
  60. 6-May-88 Dick Grune (dick) at dick
  61. The offsets in the RSB and its size were recalculated every time;
  62. this was especially ridiculous in accessing a formal parameter
  63. based on AB; they are now precalculated as soon as psize and wsize
  64. are known.
  65. 6-May-88 Dick Grune (dick) at dick
  66. The one-bit register HaltOnTrap is not powerful enough; it has to
  67. have a special value during loading the EM file (for floating
  68. overflow in calculations). We now have OnTrap with three values.
  69. 3-May-88 Dick Grune (dick) at dick
  70. If we want to check that PC does not jump from procedure to
  71. procedure, we have to know which procedure is running. Introduced
  72. an EM register PI for Procedure Identifier. We also need the limits
  73. for each procedure; for this purpose, the procedure descriptor
  74. table is now preprocessed on start-up. New files: proctab.[ch].
  75. 3-May-88 Dick Grune (dick) at dick
  76. There was still a considerable confusion between ignorable and
  77. non-ignorable traps. All ignorable traps are now handled on the
  78. spot and the procedure trap() is not called if the trap is ignored.
  79. This means that arm_trap() has disappeared.
  80. 2-May-88 Dick Grune (dick) at dick
  81. The GTO was done by a rude store in LB, SP and PC; now it properly
  82. unwinds the stack.
  83. 25-Apr-88 Dick Grune (dick) at dick
  84. With the advent of the Sun 4 RISC machine, the use of variable length
  85. argument lists has become a liability. The answer is the include file
  86. <varargs.h>. It appears that _doprnt() is sufficiently universal,
  87. fortunately.
  88. 24-Apr-88 Dick Grune (dick) at dick
  89. There are two levels to stack dumping, the RSB list and the whole
  90. contents; we now control the first by d1 and the rest by d2.
  91. 24-Apr-88 Dick Grune (dick) at dick
  92. Dumping the GDA and heap is under control of the GDA= and HEAP=
  93. parameters rather than under d3 or d4. Changed their id-s to +1
  94. and *1, so they can be set in the program but not from the
  95. LOGMASK=.
  96. 24-Apr-88 Dick Grune (dick) at dick
  97. Now that the Logging Machine has been baptized, time has come to
  98. call the controlling define LOGGING again. Sorry for the confusion.
  99. 24-Apr-88 Dick Grune (dick) at dick
  100. Trying to have the interpreter interpret itself has given rise to
  101. many small improvements, and a considerable correction to npush() and
  102. st_lds(). We are again trying.
  103. 15-Apr-88 Dick Grune (dick) at dick
  104. The tallying does in no way belong to the logging machine, so I
  105. removed the dependency on the flag CHECKING (see 15-Feb-88).
  106. 15-Apr-88 Dick Grune (dick) at dick
  107. The instruction counter inr is properly speaking no part of the
  108. EM machine, but belongs to the logging machine.
  109. 15-Apr-88 Dick Grune (dick) at dick
  110. It is unnatural for the logging machine to derive the values of its
  111. variables from shell variables. Shell variables are very global
  112. and represent a setting in which the user wishes to work. The
  113. values of the logging variables change from moment to moment. They
  114. are now derived from make-like assignments in the command line.
  115. 14-Apr-88 Dick Grune (dick) at dick
  116. To allow testing routines that handle heap and stack overflow, two
  117. command line parameters have been added, -hN and -sN, that limit
  118. the heap and stack size.
  119. 14-Apr-88 Dick Grune (dick) at dick
  120. The EM Manual provides two traps for undefined integers and floats.
  121. Since the interpreter does not have special values for undefined;
  122. since it relies on the shadow bytes to give a warning; and in view
  123. of the frequent occurrence of such undefined values, the
  124. interpreter just gives a warning.
  125. It would be nice if the interpreter could also, on request, exhibit
  126. the formally correct behaviour of giving a trap. This is, however,
  127. impossible, since such a trap would have to rely on the shadow bits
  128. and the shadow bits are only present in the checking version.
  129. The conclusion is that we do not give a trap on use of undefined,
  130. ever.
  131. 2-Apr-88 Dick Grune (dick) at dick
  132. The warnings about type T expected left one in the dark as to what
  133. *was* there. Now it prints a continued warning telling about the
  134. type found. To this end, warningcont() prints a chained warning.
  135. 1-Apr-88 Dick Grune (dick) at dick
  136. When a pointer is needed and it turns out to be an integer, a test
  137. is done to see if it happens to be zero, in which case all is well.
  138. This was, however, a rather weird test; it is much simpler, when
  139. storing a zero value, to switch on both the SH_INT bit and the
  140. SH_DATAP bit.
  141. 31-Mar-88 Dick Grune (dick) at dick
  142. The logging machine has now been separated from the EM machine as
  143. much as is reasonably possible. Weak points are still forking and
  144. the handling of the abbreviations AT= and L= .
  145. 29-Mar-88 Dick Grune (dick) at dick
  146. On many systems it is inappropriate to grab file descriptors 19 and
  147. 18 for messages and logging. It now finds the highest ones (with a
  148. limit of 99, for systems that have an unlimited supply of them).
  149. 29-Mar-88 Dick Grune (dick) at dick
  150. There were some terminological inaccuracies about the difference
  151. between a procedure identifier and a procedure descriptor.
  152. 29-Mar-88 Dick Grune (dick) at dick
  153. Since the disassembler is in no way involved in the logging machine,
  154. it seems inappropriate to use LOG(()) to produce the text. Just
  155. using printf() is much cleaner.
  156. 28-Mar-88 Dick Grune (dick) at dick
  157. Although trap handling had a file for itself, trap.c, warning
  158. handling was still done inside io.c. Introduced a new file,
  159. warn.c, to handle the warnings.
  160. 26-Mar-88 Dick Grune (dick) at dick
  161. Providing a good dump of a 2/4 machine is not easy; it is not clear
  162. where a pointer may be found. This was solved by just printing
  163. words everywhere, which was unsatisfactory. Now pointers are
  164. printed wherever the shadow bits indicate that there might be a
  165. pointer there, i.e. when the address is a word multiple and the 4
  166. bytes all have the pointer bit on. This is less unsatisfactory,
  167. though not good.
  168. 23-Mar-88 Dick Grune (dick) at dick
  169. Adapted to the new u flag in ip_spec.t; this cleared up the text
  170. segment access in text.h.
  171. 21-Mar-88 Dick Grune (dick) at dick
  172. Implemented the requirement that, when doing an RET or RTT, the stack
  173. pointer must be back where it started. This required the proc.
  174. idf to be recorded in the Return Status Block.
  175. 20-Mar-88 Dick Grune (dick) at dick
  176. Likewise (see below) for the text of the trap messages.
  177. 20-Mar-88 Dick Grune (dick) at dick
  178. Having the text, defines and numerical values in three different
  179. files is kind of inconvenient. They are now centralized in
  180. ../doc/appA (Appendix A of the manual) where they appear with
  181. explanations. The files warn_msg (with texts) and warn.h (with
  182. defines) are generated from it through M.warn_msg and M.warn_h,
  183. resp.
  184. 20-Mar-88 Dick Grune (dick) at dick
  185. Introduced the use of $(EM)/h/em_abs.h to include the trap numbers
  186. and the positions of LIN and FIL (although this seems a funny place
  187. to find them).
  188. 20-Mar-88 Dick Grune (dick) at dick
  189. Concentrated all e.out.h defines in e.out.h; this should probably
  190. go into $(EM)/h one of these days.
  191. 20-Mar-88 Dick Grune (dick) at dick
  192. The interpreter in the EM Manual does not use EBADLIN; we now decide
  193. that it is raised if the line number is larger than that mentioned
  194. in the EM header, part 2.
  195. 19-Mar-88 Dick Grune (dick) at dick
  196. The EM Manual states that a number of overflow tests need not be done
  197. if the FB_TEST bit in the second header word is not on.
  198. Experimental implementation of this shows a speed-up of 16%, so it
  199. is probably worth while.
  200. 18-Mar-88 Dick Grune (dick) at dick
  201. Reading the opcode and the argument bytes from the text segment was
  202. done by a procedure call, but the procedure call (newPC()) did not
  203. test for running out of the text segment. Replaced by a macro + a
  204. number of other similar speed-ups.
  205. 18-Mar-88 Dick Grune (dick) at dick
  206. Reraising the signal is not really useful; it is more useful never
  207. to catch a synchronous trap. UNIX then automatically does what it
  208. has to do.
  209. 17-Mar-88 Dick Grune (dick) at dick
  210. Redoing the trap mechanism lead to looking at the RTT vs RET
  211. instruction; it is nice to know where a Return Status Block
  212. originated: start-up, call, trap, non-restartable trap. We now
  213. push this info as topmost item on the stack. Values etc. in rsb.h
  214. 15-Mar-88 Dick Grune (dick) at dick
  215. I finally found out why the interpreter was spending 30% of
  216. its time in the system: it did a setjmp for each and every EM
  217. instruction, and IT does a call of signal(). Redoing this lead to
  218. considerable hacking in the trap handling mechanism. See the
  219. chapter in the documentation.
  220. 11-Mar-88 Dick Grune (dick) at dick
  221. Not all C compilers provide floating point operations. Installed a
  222. file nofloat.h with a flag NOFLOAT, which, if defined, suppresses
  223. the use of fp operations. The resulting interpreter will load EM
  224. files with floats in the GDA (but ignore them) but will give a
  225. fatal error upon attempt to execute a fp instruction.
  226. 10-Mar-88 Dick Grune (dick) at dick
  227. Added procedure identifier indications in the disassembly output,
  228. which helps in reading it.
  229. 8-Mar-88 Dick Grune (dick) at dick
  230. Implemented the other half of the type checking on ptr; this involved
  231. a macro i2p() to convert from index to pointer.
  232. 6-Mar-88 Dick Grune (dick) at dick
  233. Officially C does not have a type 'unsigned long', but the
  234. interpreter uses it heavily. Now it would be nice if we could make
  235. a version that does not use unsigned long. The main difficulty is
  236. the file do_unsar.c for doing unsigned arithmetic; for the rest it
  237. is possible and partway done. Most sizes are now of the type size.
  238. 4-Mar-88 Dick Grune (dick) at dick
  239. The list of warnings was fixed and contiguous, which was a nuisance
  240. when adding warnings. Now there is a mapping from warning numbers
  241. to the corresponding strings through a routine which does the
  242. lookup.
  243. 3-Mar-88 Dick Grune (dick) at dick
  244. The whole address testing for system calls in MON was shaky; most
  245. of them just produced traps. Corrected; they now return -1 and set
  246. errno to 14 (EFAULT).
  247. 1-Mar-88 Dick Grune (dick) at dick
  248. Some compilers use V7 ioctl request codes, some use the local
  249. codes. To accommodate both, we have a compile-time flag, V7IOCTL,
  250. which, if defined, causes the ioctl requests to be interpreted as
  251. V7 requests (of the form 't'<<8 | x)
  252. 1-Mar-88 Dick Grune (dick) at dick
  253. String arguments to system calls were, for the most part, just
  254. picked up, without any serious testing. Corrected in moncalls.c;
  255. violation results in errno == 14 (EFAULT) as it should.
  256. 29-Feb-88 Dick Grune (dick) at dick
  257. Concentrates all exits in a function close_down() which does
  258. calls to fclose() on the opened files, may reraise a caught signal
  259. and exits with the given return code.
  260. 26-Feb-88 Dick Grune (dick) at dick
  261. The type ptr was used very loosely; tightened up the code in many,
  262. many places. Introduced a macro p2i(p) which converts a "pointer"
  263. (EM address) to an index in the machine array. This modification
  264. necessitated a great many small changes and allowed some
  265. considerable simplifications.
  266. 22-Feb-88 Dick Grune (dick) at dick
  267. The format of a procedure identifier was a pointer in places and a
  268. long in others. It is now a psize unsigned integer.
  269. 16-Feb-88 Dick Grune (dick) at dick
  270. The code for calculating the sizes of the environ strings and the
  271. argument strings was unreadable. Rewritten in init.c.
  272. 15-Feb-88 Dick Grune (dick) at dick
  273. The tallying is not likely to be used by a user of the non-logging
  274. version, so it may as well be absent then, to save space. Made all
  275. tallying dependent on CHECKING.
  276. 15-Feb-88 Dick Grune (dick) at dick
  277. When allocating space for the stack and the global data area, the
  278. shadow bytes were not set to SH_UNDEF. Since the undef-ing of the
  279. shadow bytes occurs in several places, I introduced two routines,
  280. st_clear_area() and dt_clear_area() for the purpose.
  281. 12-Feb-88 Dick Grune (dick) at dick
  282. The dumping format of the text segment (just bytes in decimal) was
  283. unsatisfactory. It turned out quite easy to use the mkswitch from
  284. the switch directory to hack together a simple disassembler, which
  285. produced readable EM instructions.
  286. Moreover, text does not change while the program runs, so dumping
  287. it at a given instruction is quite meaningless. We now dump it
  288. right at the beginning, when the -T option is given.
  289. 4-Feb-88 Dick Grune (dick) at dick
  290. The whole idea of a driver (int.c) is superfluous now. Moreover
  291. there were naming problems all the time. Removed references to the
  292. driver.
  293. 1-Feb-88 Dick Grune (dick) at dick
  294. Measurements have shown that a checking but not logging interpreter
  295. is only a few percents faster that one that does both, at the
  296. expense of considerably lower functionality. So I merged logging and
  297. checking in the file checking.h. Made testing for logging more
  298. efficient by having a single variable logging which is set as
  299. soon as must_log && inr >= log_start is true. This is faster
  300. and much leaner code. Exit the function interesting().
  301. 1-Feb-88 Dick Grune (dick) at dick
  302. Removed the warning about switched-off warnings and traps; they
  303. were a nuisance.
  304. 29-Jan-88 Dick Grune (dick) at dick
  305. The zero pointer arithmetic check was implemented incorrectly.
  306. While correcting this, I cleaned up all the checking and warning
  307. mechanisms, up to a point. There is much more one can do.
  308. Unfortunately this involved renumbering the warnings, so we hack
  309. the manual to match.
  310. 27-Jan-88 Dick Grune (dick) at dick
  311. Line number and file name also in last line of stack dump, for
  312. uniformity with RSB descriptions.
  313. 25-Jan-88 Dick Grune (dick) at dick
  314. The default log mask is better at A-Z9d4twx9 than at A-Z9d1twx9.
  315. 23-Jan-88 Dick Grune (dick) at dick
  316. Warnings are now tallied not only by warning number, but also by
  317. file name and line number. Used simple linked lists in io.c.
  318. 23-Jan-88 Dick Grune (dick) at dick
  319. Having an address space of 2**32 is absurd; it will have to be 2**31
  320. to implement uninitialized pointers. Just to be able to give a
  321. good example in "How To Use the Interpreter", I changed MAX_ADR4 to
  322. I_MAXS4 (was I_MAXU4).
  323. 22-Jan-88 Dick Grune (dick) at dick
  324. The grammar of a float in the manual, the grammar of an UnsignedReal
  325. in the Pascal manual and the implementation in read.c were all
  326. slightly different. I made a clear distinction between the Pascal
  327. version (OK), the more loose implementation of "acceptable float"
  328. (with warning) and just garbage (with fatal error). ".e3" is an
  329. acceptable float.
  330. 21-Jan-88 Dick Grune (dick) at dick
  331. The interpreter did not catch stores at location 0. Changed this
  332. by making the LIN and FIL locations ROM. Introduced macros for
  333. protecting the data space (analogous to protecting the RSB in the
  334. stack). Moved all shadow byte handling to shadow.h. LIN, LNI and FIL
  335. are implemented by first lifting the write ban by dt_unprot, writing
  336. and then restoring it by dt_prot.
  337. 8-Jan-88 Dick Grune (dick) at dick
  338. The AT shell variable stopped one instruction too late. Corrected
  339. in main.c.
  340. 8-Dec-87 Dick Grune (dick) at dick
  341. I was explained that there is a subtle difference between the trap
  342. routine address being 0 and the default action upon trap. It says
  343. in the beginning of chapter 9 (Traps and Interrupts) of IR-81:
  344. Initially the pointer used is zero and all traps halt the program
  345. with ... The meaning of the SIG instruction is stated as: Trap
  346. errors to proc identifier on top of stack, -2 resets default. This
  347. means, I am told, that SIG with -2 restores the "pointer used" to
  348. zero and "directs all traps to halt the program ...", and that SIG
  349. with 0 just registers proc 0 as the trap routine.
  350. Although I think this raises more questions than it answers (how
  351. can I see if the previous trap routine was 0 or default?) I
  352. implemented it by adding an EM machine register HaltOnTrap, which
  353. is set in the non-default case.
  354. 1-Dec-87 Dick Grune (dick) at dick
  355. When debugging with the interpreter one often uses a call like
  356. LOG=123455 STOP=123457 int .....
  357. Added a shell variable AT which effects the above:
  358. AT=123456 int ...
  359. 27-Nov-87 Dick Grune (dick) at dick
  360. The shift distance in shifts and rotates must be in the range 0
  361. to object size in bits - 1, as it says in IR-81. This introduced a
  362. lot of inline code in DoSLI .. DoROR that should maybe go into
  363. subroutines.
  364. 23-Nov-87 Dick Grune (dick) at dick
  365. It turned out that LOG(("@S was a prefix both in do_store.c and in
  366. do_sets.c. Changed to @Y in the latter.
  367. 23-Nov-87 Dick Grune (dick) at dick
  368. SLI (shift left int) did an incorrect overflow test (failed on
  369. negative shift argument).
  370. 22-Nov-87 Dick Grune (dick) at dick
  371. Reformatted the output of the dump of the text and of the
  372. procedure descriptors. The latter is now more or less
  373. readable.
  374. 22-Nov-87 Dick Grune (dick) at dick
  375. Took all the direct memory access actions together in memdirect.h.
  376. This allows more readable code in dump.c and in a few other places.
  377. 10-Nov-87 Dick Grune (dick) at dick
  378. The stack dump is too unstructured and does not give enough
  379. information. Moreover, the position reporting in the various dump
  380. lines is erratic. Changed the routine do_log() to have two
  381. variants, one in which the format starts with @, which causes the
  382. position to be reported, and one in which the format starts with a
  383. blank, which is printed as is.
  384. Added two routines st_raw() and st_rsb() to print the raw and
  385. Return Status Block portions of the stack, resp., and displ_fil(),
  386. to print the name of the file, if at all possible. The stack
  387. parsing can be switched off with the -r option.
  388. 9-Nov-87 Dick Grune (dick) at dick
  389. Redressed the treatment of the Return Status Block, to give a
  390. better dump.
  391. 1-Nov-87 Dick Grune (dick) at dick
  392. The present segment checking is not very informative and produces
  393. complaints about intermediate results, which is annoying.
  394. This is not easily corrected. For each pointer, one should keep
  395. track where it originated, and when it is dereferenced a check
  396. should be made to see if it is applied to the original segment.
  397. This is kind of stiff to implement.
  398. For the time being, I have made the whole segment checking subject
  399. to a compile-time flag, SEGCHECK, to be kept in segcheck.h. The
  400. flag will normally be off, which saves time, space and
  401. inappropriate warnings.
  402. 28-Oct-87 Dick Grune (dick) at dick
  403. Small changes:
  404. - put Malloc etc in a header file: alloc.h
  405. - removed dt_ldf() (unused)
  406. - make static routines and data PRIVATE, to allow both
  407. static and extern
  408. 25-Oct-87 Dick Grune (dick) at dick
  409. arg_lae() should not check against HB but against max_addr, for
  410. funny address calculations as performed by e.g. lex.
  411. 14-Oct-87 Dick Grune (dick) at dick
  412. Exece in moncalls.c cannot succeed (if it succeeds, it's gone!)
  413. Corresponding code removed and rest straightened out.
  414. 13-Oct-87 Dick Grune (dick) at dick
  415. Brought the interpreter under RCS and CVS.
  416. 12-Oct-87 Dick Grune (dick) at dick
  417. Added a -t option in main.c to switch the tallying on.
  418. 11-Oct-87 Dick Grune (dick) at dick
  419. Added two routines, tally() and out_tally() for (you guessed it)
  420. tallying. out_tally() produces a readable file with for each
  421. source file the name followed by a number of lines, each
  422. containing a line number, the number of times that line was
  423. entered and the number of instructions executed on that line.
  424. Somebody should write a program to merge this with the original
  425. files.
  426. 3-Oct-87 Dick Grune (dick) at dick
  427. Added routines for fabs(), pow() and floor() to avoid having to
  428. invoke -lm.
  429. 2-Oct-87 Dick Grune (dick) at dick
  430. Floating point constants that started with a . were read
  431. incorrectly, as the mantissa was not initialized in that case.
  432. 25-Sep-87 Dick Grune (dick) at tjalk
  433. All access to the LIN and FIL information has been brought
  434. together in a header file linfil.h, which contains #defines for
  435. putLIN(), getLIN(), putFIL() and getFIL().
  436. 20-Sep-87 Dick Grune (dick) at tjalk
  437. Added a routine core_dump() which dumps core after a fatal error.
  438. The core image consists of the values of the EM parameters and
  439. registers, by name; ie.
  440. wsize=4
  441. psize=4
  442. ML=4294967295
  443. HB=816
  444. etc., one to a line, followed by
  445. fwrite(text, 1, DB, core_file);
  446. fwrite(FRA, 1, FRALimit, core_file);
  447. fwrite(data, 1, HL, core_file);
  448. fwrite(stack, 1, ML+1-SL, core_file);
  449. possibly followed by
  450. fwrite(FRA_sh, 1, FRALimit, core_file);
  451. fwrite(data_sh, 1, HL, core_file);
  452. fwrite(stack_sh, 1, ML+1-SL, core_file);
  453. so somebody could write a formatter for it.
  454. 18-Sep-87 Dick Grune (dick) at tjalk
  455. The function return area was a fixed-size array. Now it is
  456. allocated through Malloc(), like the other memory constituents of
  457. the EM machine. This introduced the -R-option, to set the size of
  458. the return area (default is 8).
  459. 13-Sep-87 Dick Grune (dick) at tjalk
  460. Restructured global.h to better reflect what are EM registers and
  461. what are implementation variables. This introduced read.h to
  462. concentrate the EM header quantities.
  463. 10-Sep-87 Dick Grune (dick) at tjalk
  464. Implemented a shell-variable STOP= more or less analogous to LOG=
  465. such that a call of the interpreter
  466. STOP=321456 int ...
  467. will stop the interpreter after an instruction count of 321456, to
  468. avoid run-away interpreters.
  469. 27-Aug-87 Dick Grune (dick) at tjalk
  470. The idea has been raised to let int read the default values of
  471. LOG, LOGMASK, etc., for a file in the working directory, e.g.
  472. .em_intrc or so. I have not done so since only for the LOGMASK
  473. a reasonable default can be given; the others are case-specific.
  474. So I gave LOGMASK the default value "A-Z9d1twx9" instead.
  475. 25-Aug-87 Dick Grune (dick) at tjalk
  476. Changed the name of the instruction counter from ino to inr, to
  477. avoid confusion with "inode numbers".
  478. 20-Aug-87 Dick Grune (dick) at tjalk
  479. The EM report specifies a list of UNIX Version 7 -like system
  480. calls, not full access to the system calls on the underlying
  481. machine. Therefore an attempt has been made to use or emulate
  482. the Version 7 system calls on the various machines.
  483. 18-Aug-87 Dick Grune (dick) at tjalk
  484. Introduced a file sysidf.h which holds the #define for the
  485. present system: BSD4_1, BSD4_2 or SYS_V0. Based on these, it
  486. defines generic #defines: BSD_X and SYS_V . Added various
  487. #ifdefs for the various systems, guided by cc, acc and lint.
  488. 16-Aug-87 Dick Grune (dick) at tjalk
  489. There were some portability problems with dup2 .
  490. Since dup2 is not available on all UNIX systems, and since
  491. it was a kludge in the first place, I implemented a routine
  492. move_file_descriptor, again with slightly different semantics:
  493. it closes the original file descriptor. (io.c)
  494. 13-Aug-87 Dick Grune (dick) at tjalk
  495. Renamed set_log to set_lmask and set_log_file to set_lfile, all in
  496. the name of System V compatibility. Perhaps we should rename
  497. everything, to SetLogMask, SetLogFile, etc., Modula-2 style.
  498. 13-Aug-87 Dick Grune (dick) at tjalk
  499. And changed names like do_LAEl4 to DoLAEl4, to get them through
  500. the assembler in System V.
  501. 11-Aug-87 Dick Grune (dick) at tjalk
  502. Changed names like do_LAEl4 to do_lae_l4, to keep within 8
  503. characters.
  504. 10-Jul-87 Dick Grune (dick) at tjalk
  505. Introduced monstruct.h and monstruct.c, to contain the code for
  506. copying UNIX system call structures to and from EM MON call
  507. structures.
  508. 9-Jul-87 Dick Grune (dick) at tjalk
  509. Made -W option always available.
  510. 8-Jul-87 Dick Grune (dick) at tjalk
  511. Why is the -W option available only when CHECKING is on? What am I
  512. missing?
  513. 6-Jul-87 Dick Grune (dick) at tjalk
  514. It turned out that emsig.h is included in m_sigtrp.c only and
  515. contains only definitions of functions from same m_sigtrp.c.
  516. Eliminated emsig.h.
  517. Better identification of the position from where a message is
  518. given, through the new routine position().
  519. 3-Jul-87 Dick Grune (dick) at tjalk
  520. Did the rest of dump.c (and found an error in the administration
  521. of the undefineds in hp_dump).
  522. Changed LOG to LOGGING, and log(( to LOG((, just for
  523. readability and uniformity.
  524. 2-Jul-87 Dick Grune (dick) at tjalk
  525. Changed switch.c to be a normal file in this directory; it now
  526. includes the cases in the switch from ../switch/cases , which
  527. allows greater freedom in programming the rest of switch.c.
  528. 1-Jul-87 Dick Grune (dick) at tjalk
  529. Read.c nested to excessive length. Isolated a function rd_descr()
  530. which reads one descriptor.
  531. There were many almost similar #defines for setting bits in
  532. 'trapped'. Concentrated them in arm_trap(ENUMBER).
  533. 30-Jun-87 Dick Grune (dick) at tjalk
  534. Handling of failure of ftime (moncalls.c) was wrong. Corrected.
  535. Corrected many lint gripes.
  536. 28-Jun-87 Dick Grune (dick) at tjalk
  537. The routine st_dump in dump.c does nothing but testing whether
  538. or not to log at level d1. Why not test so right at the
  539. beginning? So I did: the same test now runs in 7 sec. See macro
  540. interesting() in dump.c.
  541. 25-Jun-87 Dick Grune (dick) at tjalk
  542. Restructured the file dump.c, because of excessive nesting depth.
  543. The result, however, was an efficiency loss of 50 % (from 65 sec.
  544. to 96 sec.!). The restructuring will have to be rethought!
  545. 24-Jun-87 Dick Grune (dick) at tjalk
  546. The shadow-byte checking macro's are used only in data.c, dump.c
  547. and stack.c. They are brought into a new header file, shadow.h,
  548. which reduces the weight of mem.h.
  549. 22-Jun-87 Dick Grune (dick) at tjalk
  550. Removed or changed macros that assign to their parameters; these
  551. introduce a parameter mechanism that is alien to C and is misleading.
  552. Made testing calls of malloc and realloc into functions Malloc and
  553. Realloc in init.c.
  554. 21-Jun-87 Dick Grune (dick) at tjalk
  555. Created global.c to contain the actual definitions from
  556. global.h. The declarations stay behind in global.h , thus
  557. avoiding multiple definitions.
  558. Removed io.h altogether. All handling of the EM object file is
  559. now concentrated in read.c (fopen was in io.c, fclose in init.c).
  560. 21-Jun-87 Dick Grune (dick) at tjalk
  561. Renamed def.h global.h (in anticipation of global.c ).
  562. Removed test if (warnmark) from init.c. Here warnmark is an
  563. array, an error not caught by the VAX C compiler.
  564. 20-Jun-87 Dick Grune (dick) at tjalk
  565. Removed initializations from .h files. This resulted in the
  566. complete removal of trapmess.h and warnmess.h. Concentrated data
  567. about the return area in return.h. Slimmed down io.h considerably.
  568. 19-Jun-87 Dick Grune (dick) at tjalk
  569. Moved contents of ../include to here (src) since a separate
  570. include directory is only meaningful if it is referenced in other
  571. places as well. Updated Makefile and all #include's.
  572. Replaced SECUNDAIR by SECONDARY and TERTIAIR by TERTIARY.
  573. All files included log.h and nocheck.h , which contain compile
  574. time flags. This is not logical; only the files that use LOG and
  575. NOCHECK should have any business of knowing about them.
  576. Reorganized the files in this sense. Dependencies recalculated by
  577. $(EM)/bin/mkdep.
  578. 18-Jun-87 Dick Grune (dick) at tjalk
  579. More reformatting, especially the complicated #define's.
  580. Established a small test environment.
  581. 17-Jun-87 Dick Grune (dick) at tjalk
  582. Made all indentation conform to tabulation scheme.
  583. Replaced register by register int where appropriate.
  584. 16-Jun-87 Dick Grune (dick) at tjalk
  585. Received the directory from Eddo de Groot and Leo van den Berge.
  586. $Header$