From d19ce831a15e21cb112c7ef69143deb3e69c1775 Mon Sep 17 00:00:00 2001 From: neel Date: Tue, 8 Oct 2013 16:36:17 +0000 Subject: 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) --- usr.sbin/bhyve/bhyverun.c | 6 +++--- usr.sbin/bhyve/dbgport.h | 2 -- 2 files changed, 3 insertions(+), 5 deletions(-) (limited to 'usr.sbin/bhyve') diff --git a/usr.sbin/bhyve/bhyverun.c b/usr.sbin/bhyve/bhyverun.c index f37177f..13134e3 100644 --- a/usr.sbin/bhyve/bhyverun.c +++ b/usr.sbin/bhyve/bhyverun.c @@ -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; diff --git a/usr.sbin/bhyve/dbgport.h b/usr.sbin/bhyve/dbgport.h index 8c7dab7..2ddcbf8 100644 --- a/usr.sbin/bhyve/dbgport.h +++ b/usr.sbin/bhyve/dbgport.h @@ -29,8 +29,6 @@ #ifndef _DBGPORT_H_ #define _DBGPORT_H_ -#define DEFAULT_GDB_PORT 6466 - void init_dbgport(int port); #endif -- cgit v1.1