| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | /* | 
| Jeff Dike | ba180fd | 2007-10-16 01:27:00 -0700 | [diff] [blame] | 2 | * Copyright (C) 2000 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com) | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 3 | * Licensed under the GPL | 
|  | 4 | */ | 
|  | 5 |  | 
|  | 6 | #ifndef __UM_PTRACE_GENERIC_H | 
|  | 7 | #define __UM_PTRACE_GENERIC_H | 
|  | 8 |  | 
|  | 9 | #ifndef __ASSEMBLY__ | 
|  | 10 |  | 
| Al Viro | 5077c2a | 2008-08-18 00:19:01 -0400 | [diff] [blame] | 11 | #include <asm/ptrace-abi.h> | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 12 | #include "sysdep/ptrace.h" | 
|  | 13 |  | 
|  | 14 | struct pt_regs { | 
| Jeff Dike | 77bf440 | 2007-10-16 01:26:58 -0700 | [diff] [blame] | 15 | struct uml_pt_regs regs; | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 16 | }; | 
|  | 17 |  | 
| Christoph Hellwig | 1bd0950 | 2010-03-10 15:22:56 -0800 | [diff] [blame] | 18 | #define arch_has_single_step()	(1) | 
|  | 19 |  | 
| Al Viro | 4d338e1 | 2006-03-31 02:30:15 -0800 | [diff] [blame] | 20 | #define EMPTY_REGS { .regs = EMPTY_UML_PT_REGS } | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 21 |  | 
|  | 22 | #define PT_REGS_IP(r) UPT_IP(&(r)->regs) | 
|  | 23 | #define PT_REGS_SP(r) UPT_SP(&(r)->regs) | 
|  | 24 |  | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 25 | #define PT_REGS_RESTART_SYSCALL(r) UPT_RESTART_SYSCALL(&(r)->regs) | 
|  | 26 |  | 
|  | 27 | #define PT_REGS_SYSCALL_NR(r) UPT_SYSCALL_NR(&(r)->regs) | 
|  | 28 |  | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 29 | #define instruction_pointer(regs) PT_REGS_IP(regs) | 
|  | 30 |  | 
|  | 31 | struct task_struct; | 
|  | 32 |  | 
| Richard Weinberger | 8818b67 | 2010-11-11 14:05:04 -0800 | [diff] [blame] | 33 | extern long subarch_ptrace(struct task_struct *child, long request, | 
|  | 34 | unsigned long addr, unsigned long data); | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 35 | extern unsigned long getreg(struct task_struct *child, int regno); | 
|  | 36 | extern int putreg(struct task_struct *child, int regno, unsigned long value); | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 37 |  | 
| Paolo 'Blaisorblade' Giarrusso | aa6758d | 2006-03-31 02:30:22 -0800 | [diff] [blame] | 38 | extern int arch_copy_tls(struct task_struct *new); | 
|  | 39 | extern void clear_flushed_tls(struct task_struct *task); | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 40 |  | 
|  | 41 | #endif | 
|  | 42 |  | 
| Paolo 'Blaisorblade' Giarrusso | aa6758d | 2006-03-31 02:30:22 -0800 | [diff] [blame] | 43 | #endif |