Find the answer to your Linux question:
Results 1 to 2 of 2
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    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?


  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    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