Bug#200215: some debug info... gdb and strace broken on casals?
Ralf Baechle wrote:
[snip]
> So basically I like Thiemo's suggestion for the fix. But - the purpose
> of the three unused 32-bit fields in struct msgid64_ds is dealing with
> the year 2038 problem. So maybe we should reorder fields like:
>
> [...]
> #if defined(CONFIG_MIPS32) && !defined(CONFIG_CPU_LITTLE_ENDIAN)
> unsigned long __unused1;
> __kernel_time_t msg_stime;
> #else if defined(CONFIG_MIPS32) && defined(CONFIG_CPU_LITTLE_ENDIAN)
> __kernel_time_t msg_stime;
> unsigned long __unused1;
> #else
> __kernel_time_t msg_stime;
> #endif
> [...]
>
> ?
This looks good for the kernel side.
> That would eventually permit extending fields to 64-bit and take care of
> endianess issues.
>
> Comments?
I missed the other endianness. Appended is the version needed for glibc.
Thiemo
2003-10-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
* sysdeps/unix/sysv/linux/mips/bits/msq.h (msqid_ds): Add missing
padding.
Index: sysdeps/unix/sysv/linux/mips/bits/msq.h
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/linux/mips/bits/msq.h,v
retrieving revision 1.1
diff -a -d -u -p -r1.1 msq.h
--- sysdeps/unix/sysv/linux/mips/bits/msq.h 26 Aug 2002 01:49:55 -0000 1.1
+++ sysdeps/unix/sysv/linux/mips/bits/msq.h 7 Oct 2003 18:30:30 -0000
@@ -38,16 +38,34 @@ typedef unsigned long int msglen_t;
struct msqid_ds
{
struct ipc_perm msg_perm; /* structure describing operation permission */
+#if __WORDSIZE == 32 && defined (__MIPSEB__)
+ unsigned long int __unused1;
+#endif
__time_t msg_stime; /* time of last msgsnd command */
+#if __WORDSIZE == 32 && defined (__MIPSEL__)
+ unsigned long int __unused1;
+#endif
+#if __WORDSIZE == 32 && defined (__MIPSEB__)
+ unsigned long int __unused2;
+#endif
__time_t msg_rtime; /* time of last msgrcv command */
+#if __WORDSIZE == 32 && defined (__MIPSEL__)
+ unsigned long int __unused2;
+#endif
+#if __WORDSIZE == 32 && defined (__MIPSEB__)
+ unsigned long int __unused3;
+#endif
__time_t msg_ctime; /* time of last change */
+#if __WORDSIZE == 32 && defined (__MIPSEL__)
+ unsigned long int __unused3;
+#endif
unsigned long int __msg_cbytes; /* current number of bytes on queue */
msgqnum_t msg_qnum; /* number of messages currently on queue */
msglen_t msg_qbytes; /* max number of bytes allowed on queue */
__pid_t msg_lspid; /* pid of last msgsnd() */
__pid_t msg_lrpid; /* pid of last msgrcv() */
- unsigned long int __unused1;
- unsigned long int __unused2;
+ unsigned long int __unused4;
+ unsigned long int __unused5;
};
#ifdef __USE_MISC
Reply to: