Find the answer to your Linux question:
Results 1 to 2 of 2
Hello all, Can anybody tell me that - "How to obtain pt_regs from pid?" i.e. - I know pid of a process A. Now in process B, i want to ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Mar 2009
    Posts
    2

    How to obtain pt_regs from pid?


    Hello all,

    Can anybody tell me that -

    "How to obtain pt_regs from pid?"

    i.e. - I know pid of a process A. Now in process B, i want to obtain pt_regs of process A. How to do this?


    Thanks.
    NIsarg.

  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,665
    I think you can use ptrace(PTRACE_GETREGS, pid, 0, buffer) where buffer is a void* pointing to a pt_regs structure.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •