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]


>>>>> "Joel" == Joel Brobecker <brobecker@adacore.com> writes:

[ type rearrangements ]

Joel> As you suggest, this is easily achievable in C as well by using
Joel> unions, with the one difference is that Ada does some access
Joel> check and makes sure that we access fields that are consistent
Joel> with the discriminant (field named "Kind" in the example above).

GCC accomplishes this using checking in the accessor macros.
For the most part this works well -- it certainly catches bugs.

Joel> I think that this would help clarify the whole structure, and tell us
Joel> what is and what is not used for each kind of type.  But I am not sure
Joel> of the drawbacks... For sure this would be a pretty significant change
Joel> througout GDB, but maybe an interesting one.

Joel> (that was my windy way of saying: I think I agree)

I think it would be a good idea provided that there's some data
indicating that the space savings is worthwhile.  I'm not sure what
would qualify here.

Tom


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