# define ARG_CTID 4
#endif
-#if defined I386 || defined X86_64 || defined X32
-extern void print_user_desc(struct tcb *, long);
-#endif /* I386 || X86_64 || X32 */
+static void
+print_tls_arg(struct tcb *const tcp, const kernel_ureg_t addr)
+{
+#ifdef HAVE_STRUCT_USER_DESC
+# if SUPPORTED_PERSONALITIES > 1
+ if (current_personality == 1)
+# endif
+ {
+ print_user_desc(tcp, tcp->u_arg[ARG_TLS]);
+ }
+# if SUPPORTED_PERSONALITIES > 1
+ else
+# endif
+#endif /* HAVE_STRUCT_USER_DESC */
+ {
+ printaddr(tcp->u_arg[ARG_TLS]);
+ }
+}
SYS_FUNC(clone)
{
printaddr(tcp->u_arg[ARG_PTID]);
}
if (flags & CLONE_SETTLS) {
-#if defined I386 || defined X86_64 || defined X32
-# ifndef I386
- if (current_personality == 1)
-# endif
- {
- tprints(", tls=");
- print_user_desc(tcp, tcp->u_arg[ARG_TLS]);
- }
-# ifndef I386
- else
-# endif
-#endif /* I386 || X86_64 || X32 */
- {
- tprints(", tls=");
- printaddr(tcp->u_arg[ARG_TLS]);
- }
+ tprints(", tls=");
+ print_tls_arg(tcp, tcp->u_arg[ARG_TLS]);
}
if (flags & (CLONE_CHILD_SETTID|CLONE_CHILD_CLEARTID)) {
tprints(", child_tidptr=");
[#include <sys/types.h>
#include <asm/stat.h>])
+AC_CHECK_TYPES([struct user_desc],,, [#include <asm/ldt.h>])
+
AC_CHECK_MEMBERS([struct stat.st_mtime_nsec, struct stat64.st_mtime_nsec],,,
[#include <sys/types.h>
#include <asm/stat.h>])
extern void print_itimerval32(struct tcb *tcp, long);
#endif
+#ifdef HAVE_STRUCT_USER_DESC
+extern void print_user_desc(struct tcb *, long);
+#endif
+
/* Strace log generation machinery.
*
* printing_tcp: tcb which has incomplete line being printed right now.
#include "defs.h"
-#if defined I386 || defined X86_64 || defined X32
+#ifdef HAVE_STRUCT_USER_DESC
# include <asm/ldt.h>
return 0;
}
-#endif /* I386 || X86_64 || X32 */
+#endif /* HAVE_STRUCT_USER_DESC */
#if defined(M68K) || defined(MIPS)
SYS_FUNC(set_thread_area)
#define sys_vm86old printargs
/* machine-specific */
-#if !(defined I386 || defined X86_64 || defined X32)
+#ifndef HAVE_STRUCT_USER_DESC
# define sys_modify_ldt printargs
-# ifndef M68K
-# define sys_get_thread_area printargs
-# ifndef MIPS
-# define sys_set_thread_area printargs
-# endif
-# endif
#endif
+
+#if !(defined HAVE_STRUCT_USER_DESC || defined M68K || defined MIPS)
+# define sys_set_thread_area printargs
+#endif
+
+#if !(defined HAVE_STRUCT_USER_DESC || defined M68K)
+# define sys_get_thread_area printargs
+#endif
+
#ifdef ALPHA
# define sys_getdtablesize printargs
#endif