This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: g77/gdb problem


craig@jcb-sc.com wrote:

[ Debugging info for COMMON variables in the light of:

      SUBROUTINE AAP(NOOT)
      REAL NOOT(MIES)
      COMMON /WIM/ ZUS, JET, MIES, TEUN

  where the extent of array NOOT is passed in COMMON "WIM" (item MIES)
  and another routine can legally declare "WIM" as:

      DOUBLE PRECISION Z
      COMMON /WIM/ Z(2)
]

> But, the argument is dimensioned by a component of a common area -- more
> to the point, a *local* mapping of that common area.  (I.e. there is,
> in Fortran, no "toplevel" mapping of a common area that everyone agrees
> to -- there's just the rough equivalent of "[extern] char commonarea[SIZE];".
> Each toplevel procedure gets to decide whether, say, the third word
> in it is an integer named N, a float named V, or whatever.)

Yech - this is the first time that I actually understand the difficulty
in supporting debug info for COMMON (and the reason to treat COMMON as a
char array instead of a structure).

Bah - no wonder this is so hard ...

Thanks for the explanation, Craig !

-- 
Toon Moene (toon@moene.indiv.nluug.nl)
Saturnushof 14, 3738 XG  Maartensdijk, The Netherlands
Phone: +31 346 214290; Fax: +31 346 214286
GNU Fortran: http://world.std.com/~burley/g77.html


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]