]>
git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/blob - arch/um/sys-x86_64/ptrace.c
2 * Copyright 2003 PathScale, Inc.
4 * Licensed under the GPL
7 #define __FRAME_OFFSETS
8 #include "asm/ptrace.h"
9 #include "linux/sched.h"
10 #include "linux/errno.h"
18 #define SC_SS(r) (not_ss)
19 #define SC_DS(r) (not_ds)
20 #define SC_ES(r) (not_es)
22 /* determines which flags the user has access to. */
23 /* 1 = access 0 = no access */
24 #define FLAG_MASK 0x44dd5UL
26 int putreg(struct task_struct
*child
, int regno
, unsigned long value
)
31 /* Some code in the 64bit emulation may not be 64bit clean.
32 Don't take any chances. */
33 if (test_tsk_thread_flag(child
, TIF_IA32
))
43 if (value
&& (value
& 3) != 3)
50 if (!((value
>> 48) == 0 || (value
>> 48) == 0xffff))
56 tmp
= PT_REGS_EFLAGS(&child
->thread
.regs
) & ~FLAG_MASK
;
61 PT_REGS_SET(&child
->thread
.regs
, regno
, value
);
65 unsigned long getreg(struct task_struct
*child
, int regno
)
67 unsigned long retval
= ~0UL;
78 retval
&= PT_REG(&child
->thread
.regs
, regno
);
80 if (test_tsk_thread_flag(child
, TIF_IA32
))
87 void arch_switch(void)
90 printk("arch_switch\n");
94 int is_syscall(unsigned long addr
)
99 int dump_fpu(struct pt_regs
*regs
, elf_fpregset_t
*fpu
)
105 int get_fpregs(unsigned long buf
, struct task_struct
*child
)
111 int set_fpregs(unsigned long buf
, struct task_struct
*child
)
117 int get_fpxregs(unsigned long buf
, struct task_struct
*tsk
)
119 panic("get_fpxregs");
123 int set_fpxregs(unsigned long buf
, struct task_struct
*tsk
)
125 panic("set_fxpregs");
130 * Overrides for Emacs so that we follow Linus's tabbing style.
131 * Emacs will notice this stuff at the end of the file and automatically
132 * adjust the settings for this buffer only. This must remain at the end
134 * ---------------------------------------------------------------------------
136 * c-file-style: "linux"