[lkml]   [2004]   [May]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: ptrace in 2.6.5
On Mon, 10 May 2004, Daniel Jacobowitz wrote:

> On Tue, May 11, 2004 at 07:47:08AM +0900, OGAWA Hirofumi wrote:
> > OGAWA Hirofumi <> writes:
> >
> > > So single-step exception happen *after* executed the "mov ...".
> > > Probably you need to use the breakpoint instead of single-step.
> >
> > Ah, sorry. Just use PTRACE_SYSCALL instead of PTRACE_SINGLESTEP.
> > It's will stop before/after does syscall.
> Doing it this way is pretty lousy - you have to inspect the code after
> every step to see if it's an int $0x80. Is there some reason not to
> report a trap on the syscall return path if single-stepping?

Well, the "iret" restore TF, and Intel states that the TF flag must be set
at the beginning of the instruction for the trap to be fired. The next
insn has the TF set, and the tap is fired. But the EIP is the one
following the trapped insn.

- Davide

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 14:03    [W:0.054 / U:7.052 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site