step.c (64282ea2d2a90437c0739ce016b80a1dec16507e) | step.c (99504819fc643160afd6813921b1d42b18e52a49) |
---|---|
1/* 2 * x86 single-step support code, common to 32-bit and 64-bit. 3 */ 4#include <linux/sched.h> 5#include <linux/sched/task_stack.h> 6#include <linux/mm.h> 7#include <linux/ptrace.h> 8#include <asm/desc.h> 9#include <asm/mmu_context.h> 10 11unsigned long convert_ip_to_linear(struct task_struct *child, struct pt_regs *regs) 12{ 13 unsigned long addr, seg; 14 15 addr = regs->ip; | 1/* 2 * x86 single-step support code, common to 32-bit and 64-bit. 3 */ 4#include <linux/sched.h> 5#include <linux/sched/task_stack.h> 6#include <linux/mm.h> 7#include <linux/ptrace.h> 8#include <asm/desc.h> 9#include <asm/mmu_context.h> 10 11unsigned long convert_ip_to_linear(struct task_struct *child, struct pt_regs *regs) 12{ 13 unsigned long addr, seg; 14 15 addr = regs->ip; |
16 seg = regs->cs & 0xffff; | 16 seg = regs->cs; |
17 if (v8086_mode(regs)) { 18 addr = (addr & 0xffff) + (seg << 4); 19 return addr; 20 } 21 22#ifdef CONFIG_MODIFY_LDT_SYSCALL 23 /* 24 * We'll assume that the code segments in the GDT --- 212 unchanged lines hidden --- | 17 if (v8086_mode(regs)) { 18 addr = (addr & 0xffff) + (seg << 4); 19 return addr; 20 } 21 22#ifdef CONFIG_MODIFY_LDT_SYSCALL 23 /* 24 * We'll assume that the code segments in the GDT --- 212 unchanged lines hidden --- |