Re: using ptrace system call
From: Paul Pluzhnikov (ppluzhnikov-nsp_at_charter.net)
Date: 09/15/04
- Next message: rc: "Re: Limit on "fmt" buffer size? Loose much of long line."
- Previous message: Chuck Dillon: "Re: Xah Lee's Unixism"
- In reply to: Ash: "using ptrace system call"
- Next in thread: manugarg: "Re: using ptrace system call"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 15 Sep 2004 07:58:51 -0700
amujoo@yahoo.com (Ash) writes:
> I have written a small code for using ptrace (I am new to this system
> call)
>
> int main()
> {
Please post *complete* test case so we would not have to guess
which headers it needs, and please specify your OS.
> But the code doesnt seem to work fine and hangs. I think it is waiting
> at waitpid in parent.
It probably does.
> So where I am doing wrong and how to i print out
> the register values of the child process?
Add 'ptrace(PTRACE_TRACEME, 0, 0, 0);' to the child.
Cheers,
-- In order to understand recursion you must first understand recursion. Remove /-nsp/ for email.
- Next message: rc: "Re: Limit on "fmt" buffer size? Loose much of long line."
- Previous message: Chuck Dillon: "Re: Xah Lee's Unixism"
- In reply to: Ash: "using ptrace system call"
- Next in thread: manugarg: "Re: using ptrace system call"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|