File: set_scno.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 (19 lines) | stat: -rw-r--r-- 419 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#ifndef HAVE_GETREGS_OLD
# define arch_set_scno i386_set_scno
# include "i386/set_scno.c"
# undef arch_set_scno
#endif /* !HAVE_GETREGS_OLD */

static int
arch_set_scno(struct tcb *tcp, long scno)
{
#ifdef HAVE_GETREGS_OLD
	return upoke(tcp->pid, 8 * ORIG_RAX, scno);
#else
	if (x86_io.iov_len == sizeof(i386_regs))
		return i386_set_scno(tcp, scno);

	x86_64_regs.orig_rax = scno;
	return set_regs(tcp->pid);
#endif
}