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: [unavailable values part 1, 03/17] expose list of available ranges to common code


On Mon, 14 Feb 2011 20:39:10 +0100, Pedro Alves wrote:
> On Monday 14 February 2011 11:59:39, Jan Kratochvil wrote:
> > > +struct mem_range
> > > +{
> > > +  /* Lowest address in the range.  */
> > > +  CORE_ADDR start;
> > > +
> > > +  /* Length of the range.  */
> > > +  int length;
> > > +};
> > 
> > Why couldn't GDB become 64bit clean - that is CORE_ADDR length.  
> 
> Probably a leftover from the value ranges stuff (value lengths
> are ints, and so I made the value range lengths be ints too).
> But I disagree with making it a CORE_ADDR.  I think
> lengths should be LONGEST or ULONGEST.

While ULONGEST should work due to this invariant:
	ULONGEST_MAX >= CORE_ADDR_MAX

Still in which case an inferior object size does not fit in CORE_ADDR?
I do not think it can happen, CORE_ADDR should be OK for inferior size_t.


Thanks,
Jan


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