From owner-svn-src-all@freebsd.org Fri Feb 26 16:15:03 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EBA50AB5B27; Fri, 26 Feb 2016 16:15:03 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A2633E5A; Fri, 26 Feb 2016 16:15:03 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u1QGF2eP026626; Fri, 26 Feb 2016 16:15:02 GMT (envelope-from marcel@FreeBSD.org) Received: (from marcel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u1QGF2jb026624; Fri, 26 Feb 2016 16:15:02 GMT (envelope-from marcel@FreeBSD.org) Message-Id: <201602261615.u1QGF2jb026624@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marcel set sender to marcel@FreeBSD.org using -f From: Marcel Moolenaar Date: Fri, 26 Feb 2016 16:15:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r296102 - head/usr.sbin/bhyveload X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Feb 2016 16:15:04 -0000 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;