ptrace bug?
From: Fabiano Ramos
Date: Wed May 05 2004 - 22:07:08 EST
Hi all.
I am using ptrace() from a user program (code at the end). The thing
is, when tracing a snippet like:
0x0804869f: 8B 4D 0C mov ecx, [ebp+12]
0x080486a2: CD 80 int 0x80
0x080486a4: 89 45 F8 mov [ebp-8], eax
0x080486a7: 83 7D F8 82 cmp [ebp-8], -126
it would print
0x080486a2
0x080486a7
which means it is not stopping after the syscall (int 0x80).
Am I missing something or is it the expected behaviour?
TIA
Fabiano
-----------------------------
// wait for exec
waitpid(pid,&wait_val,0);
ptrace(PTRACE_SINGLESTEP,pid,NULL,NULL) < 0)
waitpid(pid,&wait_val,0);
while (1) {
ptrace(PTRACE_GETREGS, pid, 0, (int)®s);
printf("\n 0x%08lx \n", regs.eip);
ptrace(PTRACE_SINGLESTEP, pid, 0, 0);
wait(&wait_val);
if ( WIFEXITED(wait_val)) break;
}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/