[RFA] 64-bit range types in GDB

Tom Tromey tromey@redhat.com
Mon Dec 7 20:08:00 GMT 2009


>>>>> "Paul" == Paul Hilfinger <Hilfinger@adacore.com> writes:

Paul> Hmm.  Sticky.  There's this comment on 'length' in struct type:

Paul>   /* Length of storage for a value of this type.  This is what
Paul>      sizeof(type) would return; use it for address arithmetic,
Paul>      memory reads and writes, etc. ....

Paul> But then the code goes on to define 'unsigned length'.  However,
Paul> according to the C standard, the type should really be
Paul> size_t---and technically that should be the TARGET's size_t.  I
Paul> suspect this part of the representation hasn't been updated since
Paul> the days when people actually used 16-bit address spaces.  What do
Paul> you suppose people would say to using size_t here at least?

size_t won't help on 32-bit hosts.  There is also ULONGEST.

struct type and struct main_type are size-critical.  It would be nice
not to grow them.

I suppose it depends on how much we care about objects bigger than 4G.
An error would be cheaper :-)

I'm open to either approach, though.

Tom



More information about the Gdb-patches mailing list