From owner-svn-src-head@FreeBSD.ORG Tue Oct 8 16:36:18 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 644FBBEF; Tue, 8 Oct 2013 16:36:18 +0000 (UTC) (envelope-from neel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 380D42F8A; Tue, 8 Oct 2013 16:36:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r98GaIip024055; Tue, 8 Oct 2013 16:36:18 GMT (envelope-from neel@svn.freebsd.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r98GaHxs024053; Tue, 8 Oct 2013 16:36:17 GMT (envelope-from neel@svn.freebsd.org) Message-Id: <201310081636.r98GaHxs024053@svn.freebsd.org> From: Neel Natu Date: Tue, 8 Oct 2013 16:36:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r256156 - head/usr.sbin/bhyve X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Oct 2013 16:36:18 -0000 Author: neel Date: Tue Oct 8 16:36:17 2013 New Revision: 256156 URL: http://svnweb.freebsd.org/changeset/base/256156 Log: Change the behavior of bhyve such that the gdb listening port is opt-in rather than opt-out. Prior to this change if the "-g" option was not specified then a listening socket for tunneling gdb packets would be opened at port 6466. If a second virtual machine is fired up, also without the "-g" option, then that would fail because there is already a listener on port 6466. After this change if a gdb tunnel port needs to be created it needs to be explicitly specified with a "-g " command line option. Reviewed by: grehan@ Approved by: re@ (blanket) Modified: head/usr.sbin/bhyve/bhyverun.c head/usr.sbin/bhyve/dbgport.h Modified: head/usr.sbin/bhyve/bhyverun.c ============================================================================== --- head/usr.sbin/bhyve/bhyverun.c Tue Oct 8 16:01:43 2013 (r256155) +++ head/usr.sbin/bhyve/bhyverun.c Tue Oct 8 16:36:17 2013 (r256156) @@ -123,7 +123,7 @@ usage(int code) " \n" " -a: local apic is in XAPIC mode (default is X2APIC)\n" " -A: create an ACPI table\n" - " -g: gdb port (default is %d and 0 means don't open)\n" + " -g: gdb port\n" " -c: # cpus (default 1)\n" " -p: pin vcpu 'n' to host cpu 'pincpu + n'\n" " -H: vmexit from the guest on hlt\n" @@ -134,7 +134,7 @@ usage(int code) " -s: PCI slot config\n" " -S: legacy PCI slot config\n" " -m: memory size in MB\n", - progname, DEFAULT_GDB_PORT); + progname); exit(code); } @@ -504,7 +504,7 @@ main(int argc, char *argv[]) bvmcons = 0; progname = basename(argv[0]); - gdb_port = DEFAULT_GDB_PORT; + gdb_port = 0; guest_ncpus = 1; ioapic = 0; memsize = 256 * MB; Modified: head/usr.sbin/bhyve/dbgport.h ============================================================================== --- head/usr.sbin/bhyve/dbgport.h Tue Oct 8 16:01:43 2013 (r256155) +++ head/usr.sbin/bhyve/dbgport.h Tue Oct 8 16:36:17 2013 (r256156) @@ -29,8 +29,6 @@ #ifndef _DBGPORT_H_ #define _DBGPORT_H_ -#define DEFAULT_GDB_PORT 6466 - void init_dbgport(int port); #endif