blob: f605d3c4844cb1e2883a31daf36bc96f2b2e536e [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
Jeff Dikeba180fd2007-10-16 01:27:00 -07002 * Copyright (C) 2000 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
Linus Torvalds1da177e2005-04-16 15:20:36 -07003 * Licensed under the GPL
4 */
5
6#ifndef __UM_PTRACE_GENERIC_H
7#define __UM_PTRACE_GENERIC_H
8
9#ifndef __ASSEMBLY__
10
Al Viro5077c2a2008-08-18 00:19:01 -040011#include <asm/ptrace-abi.h>
Jeff Dikee8012b52007-10-16 01:27:16 -070012#include <asm/user.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070013#include "sysdep/ptrace.h"
14
15struct pt_regs {
Jeff Dike77bf4402007-10-16 01:26:58 -070016 struct uml_pt_regs regs;
Linus Torvalds1da177e2005-04-16 15:20:36 -070017};
18
Christoph Hellwig1bd09502010-03-10 15:22:56 -080019#define arch_has_single_step() (1)
20
Al Viro4d338e12006-03-31 02:30:15 -080021#define EMPTY_REGS { .regs = EMPTY_UML_PT_REGS }
Linus Torvalds1da177e2005-04-16 15:20:36 -070022
23#define PT_REGS_IP(r) UPT_IP(&(r)->regs)
24#define PT_REGS_SP(r) UPT_SP(&(r)->regs)
25
Linus Torvalds1da177e2005-04-16 15:20:36 -070026#define PT_REGS_RESTART_SYSCALL(r) UPT_RESTART_SYSCALL(&(r)->regs)
27
28#define PT_REGS_SYSCALL_NR(r) UPT_SYSCALL_NR(&(r)->regs)
29
Linus Torvalds1da177e2005-04-16 15:20:36 -070030#define instruction_pointer(regs) PT_REGS_IP(regs)
31
32struct task_struct;
33
Richard Weinberger8818b672010-11-11 14:05:04 -080034extern long subarch_ptrace(struct task_struct *child, long request,
35 unsigned long addr, unsigned long data);
Linus Torvalds1da177e2005-04-16 15:20:36 -070036extern unsigned long getreg(struct task_struct *child, int regno);
37extern int putreg(struct task_struct *child, int regno, unsigned long value);
Linus Torvalds1da177e2005-04-16 15:20:36 -070038
Paolo 'Blaisorblade' Giarrussoaa6758d2006-03-31 02:30:22 -080039extern int arch_copy_tls(struct task_struct *new);
40extern void clear_flushed_tls(struct task_struct *task);
Linus Torvalds1da177e2005-04-16 15:20:36 -070041
42#endif
43
Paolo 'Blaisorblade' Giarrussoaa6758d2006-03-31 02:30:22 -080044#endif