Skip to contentSkip to conversation

ptrace on i386

DISCUSSION Manfred Spraul 1 participant 1 message Dec 1, 2001

lore
Share & tools
lore
#0 lore raw
Quoted 6 lines

In linux/arch/i386/kernel/ptrace.c next code is being used in the xxxreg functions:

	if (regno > GS*4)
		regno -= 2*4;

Why this discontinuity?

Backward compatibility. The syscall entry point changed between 2.0 and 2.2, but that change must remain invisible to user space apps. the "-= 2*4" converts old offsets to new offsets (or the other way around)

--
Manfred