summaryrefslogtreecommitdiffstats
path: root/usr.sbin/bhyveload
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>2016-02-26 16:15:02 +0000
committermarcel <marcel@FreeBSD.org>2016-02-26 16:15:02 +0000
commit3b8e3cce0d1c4a579db69bbf52e17563e46ee8ba (patch)
tree22af126a22940a2f02a8492b1b78f1573cec7c8d /usr.sbin/bhyveload
parent4e12843d2196ce04800e35c683e148a0cefeed73 (diff)
downloadFreeBSD-src-3b8e3cce0d1c4a579db69bbf52e17563e46ee8ba.zip
FreeBSD-src-3b8e3cce0d1c4a579db69bbf52e17563e46ee8ba.tar.gz
Add option -C to have the guest memory included in core files.
This aids in debugging OS loaders.
Diffstat (limited to 'usr.sbin/bhyveload')
-rw-r--r--usr.sbin/bhyveload/bhyveload.89
-rw-r--r--usr.sbin/bhyveload/bhyveload.c5
2 files changed, 12 insertions, 2 deletions
diff --git a/usr.sbin/bhyveload/bhyveload.8 b/usr.sbin/bhyveload/bhyveload.8
index 918e1f0..b566343 100644
--- a/usr.sbin/bhyveload/bhyveload.8
+++ b/usr.sbin/bhyveload/bhyveload.8
@@ -25,7 +25,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd October 7, 2015
+.Dd February 26, 2016
.Dt BHYVELOAD 8
.Os
.Sh NAME
@@ -35,6 +35,7 @@
guest inside a bhyve virtual machine
.Sh SYNOPSIS
.Nm
+.Op Fl C
.Op Fl S
.Op Fl c Ar cons-dev
.Op Fl d Ar disk-path
@@ -125,6 +126,12 @@ respectively.
The default value of
.Ar mem-size
is 256M.
+.It Fl C
+Include guest memory in the core file when
+.Nm
+dumps core.
+This is intended for debugging an OS loader as it allows inspection of
+the guest memory.
.It Fl S
Wire guest memory.
.El
diff --git a/usr.sbin/bhyveload/bhyveload.c b/usr.sbin/bhyveload/bhyveload.c
index 60598b5..8417f2a 100644
--- a/usr.sbin/bhyveload/bhyveload.c
+++ b/usr.sbin/bhyveload/bhyveload.c
@@ -674,7 +674,7 @@ main(int argc, char** argv)
consin_fd = STDIN_FILENO;
consout_fd = STDOUT_FILENO;
- while ((opt = getopt(argc, argv, "Sc:d:e:h:l:m:")) != -1) {
+ while ((opt = getopt(argc, argv, "CSc:d:e:h:l:m:")) != -1) {
switch (opt) {
case 'c':
error = altcons_open(optarg);
@@ -709,6 +709,9 @@ main(int argc, char** argv)
if (error != 0)
errx(EX_USAGE, "Invalid memsize '%s'", optarg);
break;
+ case 'C':
+ memflags |= VM_MEM_F_INCORE;
+ break;
case 'S':
memflags |= VM_MEM_F_WIRED;
break;
OpenPOWER on IntegriCloud