diff options
Diffstat (limited to 'src/linux/mips/get_scno.c')
-rw-r--r-- | src/linux/mips/get_scno.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/linux/mips/get_scno.c b/src/linux/mips/get_scno.c new file mode 100644 index 000000000..d9815f630 --- /dev/null +++ b/src/linux/mips/get_scno.c @@ -0,0 +1,22 @@ +/* + * Copyright (c) 2015-2019 The strace developers. + * All rights reserved. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + */ + +/* Return codes: 1 - ok, 0 - ignore, other - error. */ +static int +arch_get_scno(struct tcb *tcp) +{ + tcp->scno = mips_REG_V0; + + if (!scno_in_range(tcp->scno)) { + if (mips_REG_A3 == 0 || mips_REG_A3 == (uint64_t) -1) { + debug_msg("stray syscall exit: v0 = %ld", tcp->scno); + return 0; + } + } + + return 1; +} |