2 * Copyright (C) 2000, 2001, 2002 Jeff Dike (jdike@karaya.com)
3 * Licensed under the GPL
6 #ifndef __UM_PTRACE_GENERIC_H
7 #define __UM_PTRACE_GENERIC_H
11 #include "linux/config.h"
13 #define pt_regs pt_regs_subarch
14 #define show_regs show_regs_subarch
15 #define send_sigtrap send_sigtrap_subarch
17 #include "asm/arch/ptrace.h"
23 #undef instruction_pointer
25 #include "sysdep/ptrace.h"
28 union uml_pt_regs regs
;
31 #define EMPTY_REGS { regs : EMPTY_UML_PT_REGS }
33 #define PT_REGS_IP(r) UPT_IP(&(r)->regs)
34 #define PT_REGS_SP(r) UPT_SP(&(r)->regs)
36 #define PT_REG(r, reg) UPT_REG(&(r)->regs, reg)
37 #define PT_REGS_SET(r, reg, val) UPT_SET(&(r)->regs, reg, val)
39 #define PT_REGS_SET_SYSCALL_RETURN(r, res) \
40 UPT_SET_SYSCALL_RETURN(&(r)->regs, res)
41 #define PT_REGS_RESTART_SYSCALL(r) UPT_RESTART_SYSCALL(&(r)->regs)
43 #define PT_REGS_SYSCALL_NR(r) UPT_SYSCALL_NR(&(r)->regs)
45 #define PT_REGS_SC(r) UPT_SC(&(r)->regs)
47 #define instruction_pointer(regs) PT_REGS_IP(regs)
51 extern unsigned long getreg(struct task_struct
*child
, int regno
);
52 extern int putreg(struct task_struct
*child
, int regno
, unsigned long value
);
53 extern int get_fpregs(unsigned long buf
, struct task_struct
*child
);
54 extern int set_fpregs(unsigned long buf
, struct task_struct
*child
);
55 extern int get_fpxregs(unsigned long buf
, struct task_struct
*child
);
56 extern int set_fpxregs(unsigned long buf
, struct task_struct
*tsk
);
58 extern void show_regs(struct pt_regs
*regs
);
60 extern void send_sigtrap(struct task_struct
*tsk
, union uml_pt_regs
*regs
,
68 * Overrides for Emacs so that we follow Linus's tabbing style.
69 * Emacs will notice this stuff at the end of the file and automatically
70 * adjust the settings for this buffer only. This must remain at the end
72 * ---------------------------------------------------------------------------
74 * c-file-style: "linux"