Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 /* 
0003  * Copyright (C) 2000 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
0004  */
0005 
0006 #ifndef __UM_PTRACE_GENERIC_H
0007 #define __UM_PTRACE_GENERIC_H
0008 
0009 #ifndef __ASSEMBLY__
0010 
0011 #include <sysdep/ptrace.h>
0012 
0013 struct pt_regs {
0014     struct uml_pt_regs regs;
0015 };
0016 
0017 #define arch_has_single_step()  (1)
0018 
0019 #define EMPTY_REGS { .regs = EMPTY_UML_PT_REGS }
0020 
0021 #define PT_REGS_IP(r) UPT_IP(&(r)->regs)
0022 #define PT_REGS_SP(r) UPT_SP(&(r)->regs)
0023 
0024 #define PT_REGS_RESTART_SYSCALL(r) UPT_RESTART_SYSCALL(&(r)->regs)
0025 
0026 #define PT_REGS_SYSCALL_NR(r) UPT_SYSCALL_NR(&(r)->regs)
0027 
0028 #define instruction_pointer(regs) PT_REGS_IP(regs)
0029 
0030 #define PTRACE_OLDSETOPTIONS 21
0031 
0032 struct task_struct;
0033 
0034 extern long subarch_ptrace(struct task_struct *child, long request,
0035     unsigned long addr, unsigned long data);
0036 extern unsigned long getreg(struct task_struct *child, int regno);
0037 extern int putreg(struct task_struct *child, int regno, unsigned long value);
0038 
0039 extern int arch_set_tls(struct task_struct *new, unsigned long tls);
0040 extern void clear_flushed_tls(struct task_struct *task);
0041 extern int syscall_trace_enter(struct pt_regs *regs);
0042 extern void syscall_trace_leave(struct pt_regs *regs);
0043 
0044 #endif
0045 
0046 #endif