Source-Changes archive

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

CVS commit: src



Module Name:    src
Committed By:   kamil
Date:           Mon Jan 16 21:35:59 UTC 2017

Modified Files:
        src/sys/arch/amd64/amd64: process_machdep.c
        src/sys/arch/amd64/include: ptrace.h
        src/sys/arch/i386/i386: process_machdep.c
        src/sys/arch/i386/include: ptrace.h
        src/sys/sys: ptrace.h
        src/tests/kernel/arch/amd64: t_ptrace_wait.c

Log Message:
Refactor ptrace_watchpoint structure to allow extensions

Add new field pw_type in the ptrace_watchpoint structure.

amd64 and i386 offer the current set of watchpoints as
PTRACE_PW_TYPE_DBREGS.

On other archs than x86, there are readily available different types of
hardware assisted watchpoints like for code-only or data-only registers on
ARM. Also in future there is an option to implement MMU-based watchpoints
and future per-port or per-cpu extensions.

Next step is to alter this interface on x86 to generate SIGTRAP with
si_code TRAP_HWWTRAP with additional information on occurred event:
 - which watchpoint fired,
 - additional watchpoint-type specific information, like on amd64 with
   PTRACE_PW_TYPE_DBREGS.:
   * only watchpoint fired
   * watchpoint fired and single step occurred

Adjust ATF tests for the pw_type change.

Sponsored by <The NetBSD Foundation>


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/sys/arch/amd64/amd64/process_machdep.c
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/amd64/include/ptrace.h
cvs rdiff -u -r1.87 -r1.88 src/sys/arch/i386/i386/process_machdep.c
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/i386/include/ptrace.h
cvs rdiff -u -r1.54 -r1.55 src/sys/sys/ptrace.h
cvs rdiff -u -r1.9 -r1.10 src/tests/kernel/arch/amd64/t_ptrace_wait.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index