This is the mail archive of the libc-ports@sources.redhat.com mailing list for the libc-ports 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] tile: fix type of prfpregset_t in <sys/procfs.h>


On 9/6/2012 1:06 PM, Chris Metcalf wrote:
> On 9/6/2012 12:25 PM, Carlos O'Donell wrote:
>> On 9/6/2012 11:43 AM, Chris Metcalf wrote:
>>> The previous dummy definition (as type int) was fine in general, since
>>> tile doesn't have floating-point registers, but it confused gdb's
>>> configure, leading to later compile errors.  This change also makes
>>> prfpregset_t parallel to prgregset_t, which seems like generally the
>>> right thing regardless of the non-existence of the actual registers :-)
>>> ---
>>> Carlos, we should backport this to 2.16 and probably 2.15, so gdb will be
>>> able to build without hackery against it.  Would you like me to integrate
>>> the change to the branch(es)?
>> If the type hasn't changed size then yes, please backport and check to 2.16 and 2.15.
> 
> The type does change size for tilegx64 (not tilepro or tilegx32).  What is
> the concern with prfpregset_t's size changing?  The type was never used for
> anything before as far as I'm aware, other than gdb, and gdb 7.5 is the
> first release of gdb that includes  tilegx support.  It requires the
> correct, new type.

The implication is clear, if the type changes size then you need to give
a good argument about why it doesn't matter to the ABI.

It sounds like you're arguing that:

(a) The type was never used for tile.

(b) The only consumer you know about is gdb and it requires the correct type.

and...

> Interestingly, in glibc itself the type is only used as "prfpregset_t *",
> so those references to the type will not change size, being a pointer
> either way.  (The references are in nptl_db, as an argument to
> ps_lgetfpregs(), ps_lsetfpregs(), td_thr_getfpregs(), and td_thr_setfpregs().)

(c) The change in size doesn't alter the layout of other structures.

It sounds like you've covered your bases.

Please checkin the change to 2.15 and 2.16.

Cheers,
Carlos.
-- 
Carlos O'Donell
Mentor Graphics / CodeSourcery
carlos_odonell@mentor.com
carlos@codesourcery.com
+1 (613) 963 1026


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