tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: PCU vs. ptrace



On 04.03.2017 18:25, Chuck Silvers wrote:
> in the case of PT_GETFPREGS or PT_SETFPREGS, the target thread will be
> stopped, but for PT_DUMPCORE the target thread supposedly may be running.
> it appears to me that the PCU save/discard code does the right thing even for
> a running thread, though the thread may change its PCU state again immediately.
> this is ok for PT_DUMPCORE, since PT_DUMPCORE is documented as possibly
> producing an inconsistent image.  ... actually, I looked at the code some more
> and PT_DUMPCORE does require that the target be stopped.

Thank you for looking at it. The PT_DUMPCORE description has been fixed
in src/lib/libc/sys/ptrace.2 r.1.41

http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libc/sys/ptrace.2.diff?r1=1.40&r2=1.41&only_with_tag=MAIN&f=h

The new form is:

PT_DUMPCORE   Makes the process specified in the pid pid generate a core
              dump.  The addr argument should contain the name of the
              core file to be generated and the data argument should
              contain the length of the core filename.

Attachment: signature.asc
Description: OpenPGP digital signature



Home | Main Index | Thread Index | Old Index