|
|
1.1 ! root 1: Feb. 1988: dmg modified f77pass1 to put out stab info to make .o's ! 2: compiled by f77 -g look like corresponding .o's from cc -g , with the ! 3: conventions described by Feldman and Weinberger in the Fortran 77 ! 4: section of Volume 2B of the Seventh Edition UNIX PROGRAMMER'S ! 5: MANUAL. This makes pi useful with f77 -g. ! 6: ! 7: COMPLEX variables appear to be ! 8: struct complex { float real, imag; }; ! 9: DOUBLE COMPLEX variables similarly appear to be ! 10: struct dcomplex { double real, imag; }; ! 11: ! 12: Norman's COMMON stab entries are retained (in hopes that some day ! 13: pi -- or some other debugger -- might be made to exploit them); ! 14: see alt/README. In addition, COMMON blocks are made to appear as ! 15: global structs: ! 16: COMMON /ABC/ N, X ! 17: looks like ! 18: extern struct abc_COMMON_ {int n; float x;} abc_; ! 19: ! 20: If the same COMMON block occurs in ! 21: ! 22: CHARACTER variables are uniformly made to appear as char* or char[] , ! 23: so one can easily see more than the first character with pi. ! 24: ! 25: Omission: stab entries for the implicit length parameters associated ! 26: with CHARACTER arguments are currently omitted. (But CHARACTER functions ! 27: have stabs entries for their return value and return value lengths.) ! 28: ! 29: Regarding what follows, also read Norman's comments in alt/README. ! 30: ! 31: Thanks to changes in pi by Tom Cargill, COMMON variables appear ! 32: to be local variables in each subprogram in which they are used. ! 33: COMMON blocks also appear in pi's Globals menu. If several ! 34: subprograms use different names for the components of a COMMON ! 35: block, then f77 merges these into the global struct that describes ! 36: the COMMON block, honoring only the first occurrence of each name. ! 37: ! 38: EQUIVALENCEs involving COMMON blocks are handled as above: the ! 39: global struct for the COMMON block gets more components, and all ! 40: components appear as local variables. EQUIVALENCEd local variables ! 41: also simply appeared in pi's local variable menu. This required ! 42: more tinkering by tac and emission by f77 of a stab sequence of ! 43: the form ! 44: ! 45: .stabn 0xe2,0,0 #0xe2 = BCOMM ! 46: .stabn symtype,0,address #symtype = STSYM (0x26) or LCSYM (0x28) ! 47: .stabs "vname1",0,type,offset ! 48: # type modifiers (SSYM, DIM), if required ! 49: .stabs "vname2",0,type,offset ! 50: # type modifiers (SSYM, DIM), if required ! 51: .... ! 52: .stabn 0xe8,0,0,0 #0xe8 = ECOML ! 53: ! 54: This departs from Norman's scheme by moving the address from the ! 55: ECOML line (where we can't get it right without tinkering /bin/as ! 56: and /bin/ld) to a separate STSYM or LCSYM line right after the BCOMM ! 57: (in which we get the right address). This differs from COMMON in ! 58: that the name field of the BCOMM is null. (It would be nicer if ! 59: COMMON and EQUIVALENCE could be handled uniformly, but the addressing ! 60: restrictions of /bin/as and /bin/ld prevent this.) ! 61: ! 62: ! 63: Bug fixes made 30 June 1989 to /n/bowell/usr/src/cmd/f77: ! 64: 1. Type of PARAMETERs honored. ! 65: 2. Comma allowed in DO: do 10, i = 1, n ! 66: 3. Stmt function actual arg can be subscripted var of same name as the dummy. ! 67: 4. Calling sequence expected by functions and subroutines adjusted to ! 68: match the calling sequence passed to same. Previously, procedures ! 69: expected a length parameter to accompany procedure arguments. This ! 70: change eliminates the old "bad code may have been generated" warning. ! 71: 5. DATA statements with general implied DOs now work. Previously only ! 72: an initial, singly nested DO worked. ! 73: 6. A loop like "DO 10 i = 1, 1, -1" no longer has its range omitted. ! 74: 7. ASSIGNed FORMAT labels work. ! 75: 8. New flags -b and -B added: -b warns when the above bug fixes affect ! 76: generated objects; -B reverts to the previous buggy behavior. ! 77: 9. Default max number of statement labels increased (from 201 to 801). ! 78: 10. Disallow statement functions among executables, even when there ! 79: are DATA statements.
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.