diff options
author | neel <neel@FreeBSD.org> | 2013-10-08 16:36:17 +0000 |
---|---|---|
committer | neel <neel@FreeBSD.org> | 2013-10-08 16:36:17 +0000 |
commit | d19ce831a15e21cb112c7ef69143deb3e69c1775 (patch) | |
tree | 92a97612c9d21e16b9f51c3a6ba5474c636776b1 | |
parent | bb769cc3482c3a78d95cd7c9a9786fbab7877295 (diff) | |
download | FreeBSD-src-d19ce831a15e21cb112c7ef69143deb3e69c1775.zip FreeBSD-src-d19ce831a15e21cb112c7ef69143deb3e69c1775.tar.gz |
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)
-rw-r--r-- | usr.sbin/bhyve/bhyverun.c | 6 | ||||
-rw-r--r-- | usr.sbin/bhyve/dbgport.h | 2 |
2 files changed, 3 insertions, 5 deletions
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) " <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; 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 |