]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
bhyve: Add support for XML register definitions
authorMark Johnston <markj@FreeBSD.org>
Wed, 21 Feb 2024 00:21:29 +0000 (19:21 -0500)
committerMark Johnston <markj@FreeBSD.org>
Wed, 21 Feb 2024 00:51:34 +0000 (19:51 -0500)
commitf81cdf24ba5436367377f7c8e8f51f6df2a75ca7
treea5d50ea5850e2bac88fdd3f2ce162095a9341263
parent3668e1fa0a50562f58508565bdde0bdb83e0b475
bhyve: Add support for XML register definitions

This is useful for exposing additional registers to debuggers.  For
instance, control registers are now available on amd64 when using gdb to
debug a guest.

The stub indicates support by including the string
"qXfer:features:read+" in its feature list.  The debugger queries for
target descriptions by sending the query "qXfer:features:read:" followed
by a file path.

The XML definitions are copied from QEMU and installed to
/usr/share/bhyve/gdb.

Note that we currently don't handle the SIMD registers at all, since
that's of somewhat limited utility (for me at least) and since that
requires new ioctls to fetch the register values.

Reviewed by: jhb
MFC after: 2 weeks
Sponsored by: Innovate UK
Differential Revision: https://reviews.freebsd.org/D43666
etc/mtree/BSD.usr.dist
usr.sbin/bhyve/Makefile
usr.sbin/bhyve/gdb.c
usr.sbin/bhyve/gdb/Makefile [new file with mode: 0644]
usr.sbin/bhyve/gdb/amd64.xml [new file with mode: 0644]