summaryrefslogtreecommitdiff
path: root/backends/linux-core-note.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2007-10-16 05:21:27 +0000
committerUlrich Drepper <drepper@redhat.com>2007-10-16 05:21:27 +0000
commitb597dfad924980dede10d7c19d87900b6172e599 (patch)
tree3c090b69070ad0056d479d90aa1f8829810140ba /backends/linux-core-note.c
parent3fc3d7bd6bd8485404a936f7354e781dc2be6a5a (diff)
downloadelfutils-b597dfad924980dede10d7c19d87900b6172e599.tar.gz
merge of '92c36bfdbc6468d1711c043b530e0dfe5abb6dec'
and 'c22c8c43f8f68b0bffd4d5ccdb2282c958268742'
Diffstat (limited to 'backends/linux-core-note.c')
-rw-r--r--backends/linux-core-note.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/backends/linux-core-note.c b/backends/linux-core-note.c
index 0913cc97..c4a90b70 100644
--- a/backends/linux-core-note.c
+++ b/backends/linux-core-note.c
@@ -53,6 +53,15 @@ struct EBLHOOK(timeval)
FIELD (ULONG, tv_usec);
};
+/* On sparc64, tv_usec (suseconds_t) is actually 32 bits with 32 bits padding.
+ The 'T'|0x80 value for .format indicates this as a special kludge. */
+#if SUSECONDS_HALF
+# define TIMEVAL_FIELD(name) FIELD (time, ULONG, name, 'T'|0x80, .count = 2)
+#else
+# define TIMEVAL_FIELD(name) FIELD (time, ULONG, name, 'T', .count = 2)
+#endif
+
+
struct EBLHOOK(prstatus)
{
struct EBLHOOK(siginfo) pr_info;
@@ -115,10 +124,10 @@ static const Ebl_Core_Item prstatus_items[] =
FIELD (identity, PID_T, ppid, 'd'),
FIELD (identity, PID_T, pgrp, 'd'),
FIELD (identity, PID_T, sid, 'd'),
- FIELD (time, ULONG, utime, 'T', .count = 2),
- FIELD (time, ULONG, stime, 'T', .count = 2),
- FIELD (time, ULONG, cutime, 'T', .count = 2),
- FIELD (time, ULONG, cstime, 'T', .count = 2),
+ TIMEVAL_FIELD (utime),
+ TIMEVAL_FIELD (stime),
+ TIMEVAL_FIELD (cutime),
+ TIMEVAL_FIELD (cstime),
#ifdef PRSTATUS_REGSET_ITEMS
PRSTATUS_REGSET_ITEMS,
#endif