Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 8 Oct 2013 16:36:17 +0000 (UTC)
From:      Neel Natu <neel@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r256156 - head/usr.sbin/bhyve
Message-ID:  <201310081636.r98GaHxs024053@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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 <portnum>" 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)
 		" <vmname>\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: <slot,driver,configinfo> PCI slot config\n"
 		"       -S: <slot,driver,configinfo> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201310081636.r98GaHxs024053>