File: set_error.c

package info (click to toggle)
strace 4.15-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 22,752 kB
  • ctags: 9,462
  • sloc: ansic: 62,976; sh: 7,256; makefile: 3,551; perl: 352; awk: 343; lisp: 44; sed: 6
file content (20 lines) | stat: -rw-r--r-- 478 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#ifndef HAVE_GETREGS_OLD
# define arch_set_error i386_set_error
# include "i386/set_error.c"
# undef arch_set_error
#endif /* !HAVE_GETREGS_OLD */

static int
arch_set_error(struct tcb *tcp)
{
#ifdef HAVE_GETREGS_OLD
	x86_64_regs.rax = - (long long) tcp->u_error;
	return upoke(tcp->pid, 8 * RAX, x86_64_regs.rax);
#else
	if (x86_io.iov_len == sizeof(i386_regs))
		return i386_set_error(tcp);

	x86_64_regs.rax = - (long long) tcp->u_error;
	return set_regs(tcp->pid);
#endif
}