ptrace.h 956 B

123456789101112131415161718192021222324252627282930313233
  1. /*
  2. * Copyright (C) 2013 Altera Corporation
  3. * Copyright (C) 2010 Tobias Klauser <tklauser@distanz.ch>
  4. * Copyright (C) 2004 Microtronix Datacom Ltd
  5. *
  6. * based on m68k asm/processor.h
  7. *
  8. * This file is subject to the terms and conditions of the GNU General Public
  9. * License. See the file "COPYING" in the main directory of this archive
  10. * for more details.
  11. */
  12. #ifndef _ASM_NIOS2_PTRACE_H
  13. #define _ASM_NIOS2_PTRACE_H
  14. #include <uapi/asm/ptrace.h>
  15. #ifndef __ASSEMBLY__
  16. #define user_mode(regs) (((regs)->estatus & ESTATUS_EU))
  17. #define instruction_pointer(regs) ((regs)->ra)
  18. #define profile_pc(regs) instruction_pointer(regs)
  19. #define user_stack_pointer(regs) ((regs)->sp)
  20. extern void show_regs(struct pt_regs *);
  21. #define current_pt_regs() \
  22. ((struct pt_regs *)((unsigned long)current_thread_info() + THREAD_SIZE)\
  23. - 1)
  24. int do_syscall_trace_enter(void);
  25. void do_syscall_trace_exit(void);
  26. #endif /* __ASSEMBLY__ */
  27. #endif /* _ASM_NIOS2_PTRACE_H */