VirtualBox

Changeset 86327 in vbox for trunk/src/VBox/VMM


Ignore:
Timestamp:
Sep 28, 2020 4:20:50 PM (4 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
140613
Message:

Debugger: Allow for different I/O providers instead of only TCP

So far TCP was the only option to communicate remotely with the internal debugger, the other option
was to use the console from the GUI directly. This commit reworks basic I/O to allow for different
providers where TCP is just one option. The second one being introduced is an IPC provider using a local
socket or named pipe depending on the platform. This allows for Windows kernel debugging over a pipe
using the KD stub in VirtualBox and WinDbg running on the host (not tested yet).

Furthermore this commit allows multiple stubs to be listening for connections at the same time, so
one can have a GDB stub listening on one TCP port and the native VBox debugger listening on another one
or even using a different I/O provider. Only one session can be active at a time though, because sharing
debugger states is impossible. To configure this the following CFGM keys need to be set for each listener:

"DBGC/<Some unique ID>/Provider" "tcp|ipc"
"DBGC/<Some unique ID>/StubType" "native|gdb|kd"
"DBGC/<Some unique ID>/Address" "<ip>|<local named pipe or socket path>"
"DBGC/<Some unique ID>/Port" "<port>" (for TCP only)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMR3/VM.cpp

    r85121 r86327  
    650650                             */
    651651                            void *pvUser = NULL;
    652                             rc = DBGCTcpCreate(pUVM, &pvUser);
     652                            rc = DBGCIoCreate(pUVM, &pvUser);
    653653                            if (    RT_SUCCESS(rc)
    654654                                ||  rc == VERR_NET_ADDRESS_IN_USE)
     
    669669                                }
    670670#ifdef VBOX_WITH_DEBUGGER
    671                                 DBGCTcpTerminate(pUVM, pUVM->vm.s.pvDBGC);
     671                                DBGCIoTerminate(pUVM, pUVM->vm.s.pvDBGC);
    672672                                pUVM->vm.s.pvDBGC = NULL;
    673673                            }
     
    21972197        AssertRC(rc);
    21982198#ifdef VBOX_WITH_DEBUGGER
    2199         rc = DBGCTcpTerminate(pUVM, pUVM->vm.s.pvDBGC);
     2199        rc = DBGCIoTerminate(pUVM, pUVM->vm.s.pvDBGC);
    22002200        pUVM->vm.s.pvDBGC = NULL;
    22012201#endif
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette