linux/arch/frv/include/asm/ptrace.h
<<
>>
Prefs
   1/* ptrace.h: ptrace() relevant definitions
   2 *
   3 * Copyright (C) 2003 Red Hat, Inc. All Rights Reserved.
   4 * Written by David Howells (dhowells@redhat.com)
   5 *
   6 * This program is free software; you can redistribute it and/or
   7 * modify it under the terms of the GNU General Public License
   8 * as published by the Free Software Foundation; either version
   9 * 2 of the License, or (at your option) any later version.
  10 */
  11#ifndef _ASM_PTRACE_H
  12#define _ASM_PTRACE_H
  13
  14#include <asm/irq_regs.h>
  15#include <uapi/asm/ptrace.h>
  16
  17#define in_syscall(regs) (((regs)->tbr & TBR_TT) == TBR_TT_TRAP0)
  18#ifndef __ASSEMBLY__
  19
  20struct task_struct;
  21
  22/*
  23 * we dedicate GR28 to keeping a pointer to the current exception frame
  24 * - gr28 is destroyed on entry to the kernel from userspace
  25 */
  26register struct pt_regs *__frame asm("gr28");
  27
  28#define user_mode(regs)                 (!((regs)->psr & PSR_S))
  29#define instruction_pointer(regs)       ((regs)->pc)
  30#define user_stack_pointer(regs)        ((regs)->sp)
  31#define current_pt_regs()               (__frame)
  32
  33extern unsigned long user_stack(const struct pt_regs *);
  34#define profile_pc(regs) ((regs)->pc)
  35
  36#define task_pt_regs(task) ((task)->thread.frame0)
  37
  38#define arch_has_single_step()  (1)
  39
  40#endif /* !__ASSEMBLY__ */
  41#endif /* _ASM_PTRACE_H */
  42