svn commit: r296102 - head/usr.sbin/bhyveload
Marcel Moolenaar
marcel at FreeBSD.org
Fri Feb 26 16:15:04 UTC 2016
Author: marcel
Date: Fri Feb 26 16:15:02 2016
New Revision: 296102
URL: https://svnweb.freebsd.org/changeset/base/296102
Log:
Add option -C to have the guest memory included in core files.
This aids in debugging OS loaders.
Modified:
head/usr.sbin/bhyveload/bhyveload.8
head/usr.sbin/bhyveload/bhyveload.c
Modified: head/usr.sbin/bhyveload/bhyveload.8
==============================================================================
--- head/usr.sbin/bhyveload/bhyveload.8 Fri Feb 26 16:12:20 2016 (r296101)
+++ head/usr.sbin/bhyveload/bhyveload.8 Fri Feb 26 16:15:02 2016 (r296102)
@@ -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
Modified: head/usr.sbin/bhyveload/bhyveload.c
==============================================================================
--- head/usr.sbin/bhyveload/bhyveload.c Fri Feb 26 16:12:20 2016 (r296101)
+++ head/usr.sbin/bhyveload/bhyveload.c Fri Feb 26 16:15:02 2016 (r296102)
@@ -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;
More information about the svn-src-all
mailing list