* ptrace bug?
@ 2004-05-06 2:59 Fabiano Ramos
0 siblings, 0 replies; only message in thread
From: Fabiano Ramos @ 2004-05-06 2:59 UTC (permalink / raw)
To: Linux Kernel Mailing List, Fabiano Ramos,
Edil Severiano Tavares Fernandes
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;
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2004-05-06 2:58 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-05-06 2:59 ptrace bug? Fabiano Ramos
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®