aboutsummaryrefslogtreecommitdiff
path: root/include/asm-i386/ptrace.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-i386/ptrace.h')
-rw-r--r--include/asm-i386/ptrace.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/include/asm-i386/ptrace.h b/include/asm-i386/ptrace.h
index bdbc894339b..6002597b9e1 100644
--- a/include/asm-i386/ptrace.h
+++ b/include/asm-i386/ptrace.h
@@ -16,8 +16,8 @@ struct pt_regs {
long eax;
int xds;
int xes;
- /* int xfs; */
- int xgs;
+ int xfs;
+ /* int xgs; */
long orig_eax;
long eip;
int xcs;
@@ -49,6 +49,10 @@ static inline int user_mode_vm(struct pt_regs *regs)
{
return ((regs->xcs & SEGMENT_RPL_MASK) | (regs->eflags & VM_MASK)) >= USER_RPL;
}
+static inline int v8086_mode(struct pt_regs *regs)
+{
+ return (regs->eflags & VM_MASK);
+}
#define instruction_pointer(regs) ((regs)->eip)
#define regs_return_value(regs) ((regs)->eax)