This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] static_kind -> bit0, bit1 [Re: [gdb] Fortran dynamic arrays]


> > Next, we add a new field in the "loc" union that would contain a pointer
> > to the dwarf block, and probably create some kind of routine to create
> > these range types. After that, we can update the DWARF reader to handle
> > DWARF blocks for range type bounds, and finally update Fortran to make
> > use of them.
> > 
> > What do others think?
> 
> Agreed.  I would suggest LOC_COMPUTED as the role model, except I
> don't see where to stash an ops pointer.  Maybe in TYPE_SPECIFIC, or
> is that ugly?

I think it is kind of ugly, and i tried to think about it for a while,
but I don't see many possible solutions if we don't want to increase
the gdbtype struct size. Ideally, I would like to stash the ops pointer
in the field structure itself, but there is no room either.  The
alternative I had in mind is hard-code the fact that the field a DWARF
block and not use an ops pointer at all to get the field position.
The code is not as generic, but we can separate this part of the design
we're a little stuck on from the implementation of support for field
positions encoded as DWARF blocks without too much loss of quality.
Once we are decided on how to store the ops pointer, enhancing the
framework should be fairly mechanical...

-- 
Joel


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