Hardware assisted breakpoint/watchpoint API has been merged with current.
Add note about pthread_dbg(3) API needed to be refactored and limited to
querying POSIX thread private data fields.
Sponsored by <The NetBSD Foundation>
Addedd tests:
- watchpoint_count
- watchpoint_read
- watchpoint_write_unmodified
- watchpoint_trap_code[0123]
- watchpoint_trap_data_write[0123]
- watchpoint_trap_data_rw[0123]
These code will be reused later for i386 and moved to a common place like
tests/kernel/arch/x86.
These tests are x86 specific only. The same API but different private
ptrace_watchpoint MD part has to be used on other ports.
All tests pass on amd64.
Sponsored by <The NetBSD Foundation>
Add new ptrace(2) calls:
- PT_COUNT_WATCHPOINTS - count the number of available hardware watchpoints
- PT_READ_WATCHPOINT - read struct ptrace_watchpoint from the kernel state
- PT_WRITE_WATCHPOINT - write new struct ptrace_watchpoint state, this
includes enabling and disabling watchpoints
The ptrace_watchpoint structure contains MI and MD parts:
typedef struct ptrace_watchpoint {
int pw_index; /* HW Watchpoint ID (count from 0) */
lwpid_t pw_lwpid; /* LWP described */
struct mdpw pw_md; /* MD fields */
} ptrace_watchpoint_t;
For example amd64 defines MD as follows:
struct mdpw {
void *md_address;
int md_condition;
int md_length;
};
These calls are protected with the __HAVE_PTRACE_WATCHPOINTS guard.
Tested on amd64, initial support added for i386 and XEN.
Sponsored by <The NetBSD Foundation>
GNU ld for alpha is so clever that the redundant GP load in function
entrypoint is skipped. we must therefore skip initial GP loads; otherwise
breakpoints in function entrypoints can also be skipped.
Reported to upstream (Bug 20969):
https://sourceware.org/bugzilla/show_bug.cgi?id=20969
ok martin
The intention of the change is to prevent bpf_mtap from running in
hardware interrupt context. if_start is a usual place to do bpf_mtap
on Tx.
Proposed on tech-kern and tech-net
The benefits of the change are:
- We can reduce codes
- We can provide the same behavior between drivers
- Where/When if_ipackets is counted up
- Note that some drivers still update packet statistics in their own
way (periodical update)
- Moved bpf_mtap run in softint
- This makes it easy to MP-ify bpf
Proposed on tech-kern and tech-net
Add new symbol ATF_TP_ADD_TC_HAVE_PTRACE_WATCHPOINTS() to be protected with
the __HAVE_PTRACE_WATCHPOINTS guard.
XXX:
Mark check_happy() with __attribute__((optimize("O0"))).
Disabled optimization is required to make tests for hardware assisted
traps in .text functional.
Tested with GCC 5.4 on NetBSD 7.99.47 amd64
Sponsored by <The NetBSD Foundation>
- add support for detecting equivalent events to PTRACE_O_TRACEEXEC,
PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXIT from Linux
- exect(3) rething or remove -- maybe PT_TRACE_ME + PTRACE_O_TRACEEXEC?
Sponsored by <The NetBSD Foundation>
Note that entries in the md.i386 and md.amd64 lists are actually deleted
(rather than being marked "obsolete" as directed in the comments). This
is OK, since there is now a new module in the mi list to replace them.
build it for all architectures.
By doing this, we can handle pcppi, audio, or both attachments with
non-built-in modules.
XXX Still to do: the module currently cannot be unloaded, and the
XXX spkr device(s) currently cannot be detached. (Really, two
XXX sides of the same problem.)
of the lists. Speeds up namei on cached vnodes by ~3 percent.
Merge "vrele_thread" into "vdrain_thread" so we have one thread
working on the lrulists. Adapt vfs_drainvnodes() to always wait
for a complete cycle of vdrain_thread().
always equal to "desiredvnodes" and move its definition
from sys/vnode.h to sys/vnode_impl.h.
Extend vfs_drainvnodes() to also wait for deferred vrele to flush
and replace the call to vrele_flush() with a call to vfs_drainvnodes().
Add new entries:
- add support for PT_STEP, PT_GETREGS, PT_SETREGS, PT_GETFPREGS,
PT_SETFPREGS in all ports
- integrate all ptrace(2) features in gdb
- add ptrace(2) NetBSD support in LLDB
Sponsored by <The NetBSD Foundation>