static void
decode_rlimit(struct tcb *tcp, unsigned long addr)
{
	if (!addr)
		tprints("NULL");
	else if (!verbose(tcp) || (exiting(tcp) && syserror(tcp)))
		tprintf("%#lx", addr);
	else {
# if SIZEOF_RLIM_T == 4
		print_rlimit32(tcp, addr);
# else
		if (current_wordsize == 4)
			print_rlimit32(tcp, addr);
		else
			print_rlimit64(tcp, addr);
# endif
	}
}
static void
decode_rlimit(struct tcb *tcp, unsigned long addr)
{
# if defined(X86_64) || defined(X32)
	/*
	 * i386 is the only personality on X86_64 and X32
	 * with 32-bit rlim_t.
	 * When current_personality is X32, current_wordsize
	 * equals to 4 but rlim_t is 64-bit.
	 */
	if (current_personality == 1)
# else
	if (current_wordsize == 4)
# endif
		print_rlimit32(tcp, addr);
	else
		print_rlimit64(tcp, addr);
}
示例#3
0
文件: resource.c 项目: geofft/strace
static void
decode_rlimit(struct tcb *tcp, unsigned long addr)
{
	if (!addr)
		tprints("NULL");
	else if (!verbose(tcp) || (exiting(tcp) && syserror(tcp)))
		tprintf("%#lx", addr);
	else {
# if defined(X86_64) || defined(X32)
		/*
		 * i386 is the only personality on X86_64 and X32
		 * with 32-bit rlim_t.
		 * When current_personality is X32, current_wordsize
		 * equals to 4 but rlim_t is 64-bit.
		 */
		if (current_personality == 1)
# else
		if (current_wordsize == 4)
# endif
			print_rlimit32(tcp, addr);
		else
			print_rlimit64(tcp, addr);
	}
}