]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
x86: consolidate hw watchpoint logic into new file
authorMitchell Horne <mhorne@FreeBSD.org>
Fri, 19 Mar 2021 19:39:12 +0000 (16:39 -0300)
committerMitchell Horne <mhorne@FreeBSD.org>
Fri, 19 Mar 2021 19:51:52 +0000 (16:51 -0300)
commitc02c04f113fe65001bc21363ae3ad08cf6c763eb
tree33d68c6af9c0877041e0dfad399d96afcf652600
parenta1d803c162067b6cd334fc8a44a89f26cc82d83b
x86: consolidate hw watchpoint logic into new file

This is a prerequisite to using these functions outside of ddb, but also
provides some cleanup and minor refactoring. This code is almost
entirely duplicated between the two implementations, the only
significant difference being the lack of dbreg synchronization on i386.

Cleanups are:
 - demote some internal functions to static
 - use the constant NDBREGS instead of a '4' literal
 - remove K&R definitions
 - some added comments

Reviewed by: kib, jhb
Sponsored by: NetApp, Inc.
Sponsored by: Klara, Inc.
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D29153
sys/amd64/amd64/db_trace.c
sys/conf/files.x86
sys/i386/i386/db_trace.c
sys/x86/include/x86_var.h
sys/x86/x86/dbreg.c [new file with mode: 0644]