Commit [61e426] Maximize Restore History

Add support for Altera's Nios-II softcore architecture

This commit adds strace support for Altera's Nios-II official
kernel port as found in git://

Notice that this an out-of-tree kernel architectural port, and uses the
legacy (non-generic) system call ABI. In particular, the port doesn't
support PTRACE_GETREGSET, so the implementation is based on PTRACE_GETREGS.

Given it's mandatory for new architectures to support the generic
syscall ABI and PTRACE_GETREGSET, if the nios2 architecure is ever
mainlined, the strace support will have to be re-factored accordingly.

* linux/nios2/ New file.
* linux/nios2/syscallent.h: Likewise.
* (EXTRA_DIST): Add linux/nios2/ and
* Add NIOS2 to the list of supported architectures.
* defs.h [NIOS2]: Use register reading system.
* process.c (struct_user_offsets): Add NIOS2 support.
* syscall.c (get_regs, get_scno, get_syscall_args,
get_syscall_result, get_error): Likewise.
* util.c (change_syscall): Likewise.
* mem.c (sys_getpagesize): Define on NIOS2.
* system.c [NIOS2] (sys_cacheflush, sys_nios2cmpxchg): New functions.

Signed-off-by: Ezequiel Garcia <>
Acked-by: Mike Frysinger <>

Ezequiel Garcia Ezequiel Garcia 2014-02-06

Dmitry V. Levin Dmitry V. Levin 2014-02-06

added linux/nios2/
added linux/nios2/syscallent.h
linux/nios2/ Diff Switch to side-by-side view
linux/nios2/syscallent.h Diff Switch to side-by-side view