Changeset 96888 in vbox for trunk/src/VBox/Main/xml
- Timestamp:
- Sep 26, 2022 7:29:50 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/xml/Settings.cpp
r96407 r96888 4176 4176 fTracingEnabled(false), 4177 4177 fAllowTracingToAccessVM(false), 4178 strTracingConfig() 4178 strTracingConfig(), 4179 enmDbgProvider(GuestDebugProvider_None), 4180 enmIoProvider(GuestDebugIoProvider_None), 4181 strAddress(), 4182 ulPort(0) 4179 4183 { 4180 4184 } … … 4187 4191 return !fTracingEnabled 4188 4192 && !fAllowTracingToAccessVM 4189 && strTracingConfig.isEmpty(); 4193 && strTracingConfig.isEmpty() 4194 && enmDbgProvider == GuestDebugProvider_None 4195 && enmIoProvider == GuestDebugIoProvider_None 4196 && strAddress.isEmpty() 4197 && ulPort == 0; 4190 4198 } 4191 4199 … … 4200 4208 || ( fTracingEnabled == d.fTracingEnabled 4201 4209 && fAllowTracingToAccessVM == d.fAllowTracingToAccessVM 4202 && strTracingConfig == d.strTracingConfig); 4210 && strTracingConfig == d.strTracingConfig 4211 && enmDbgProvider == d.enmDbgProvider 4212 && enmIoProvider == d.enmIoProvider 4213 && strAddress == d.strAddress 4214 && ulPort == d.ulPort); 4203 4215 } 4204 4216 … … 6222 6234 pelmTracing->getAttributeValue("allowTracingToAccessVM", dbg.fAllowTracingToAccessVM); 6223 6235 pelmTracing->getAttributeValue("config", dbg.strTracingConfig); 6236 } 6237 6238 const xml::ElementNode *pelmGuestDebug = elmDebugging.findChildElement("GuestDebug"); 6239 if (pelmGuestDebug) 6240 { 6241 Utf8Str strTmp; 6242 pelmGuestDebug->getAttributeValue("provider", strTmp); 6243 if (strTmp == "None") 6244 dbg.enmDbgProvider = GuestDebugProvider_None; 6245 else if (strTmp == "GDB") 6246 dbg.enmDbgProvider = GuestDebugProvider_GDB; 6247 else if (strTmp == "KD") 6248 dbg.enmDbgProvider = GuestDebugProvider_KD; 6249 else 6250 throw ConfigFileError(this, pelmGuestDebug, N_("Invalid value '%s' for GuestDebug/@provider attribute"), strTmp.c_str()); 6251 6252 pelmGuestDebug->getAttributeValue("io", strTmp); 6253 if (strTmp == "None") 6254 dbg.enmIoProvider = GuestDebugIoProvider_None; 6255 else if (strTmp == "TCP") 6256 dbg.enmIoProvider = GuestDebugIoProvider_TCP; 6257 else if (strTmp == "UDP") 6258 dbg.enmIoProvider = GuestDebugIoProvider_UDP; 6259 else if (strTmp == "IPC") 6260 dbg.enmIoProvider = GuestDebugIoProvider_IPC; 6261 else 6262 throw ConfigFileError(this, pelmGuestDebug, N_("Invalid value '%s' for GuestDebug/@io attribute"), strTmp.c_str()); 6263 6264 pelmGuestDebug->getAttributeValue("address", dbg.strAddress); 6265 pelmGuestDebug->getAttributeValue("port", dbg.ulPort); 6224 6266 } 6225 6267 } … … 8283 8325 pElmTracing->setAttribute("allowTracingToAccessVM", dbg.fAllowTracingToAccessVM); 8284 8326 pElmTracing->setAttribute("config", dbg.strTracingConfig); 8327 8328 xml::ElementNode *pElmGuestDebug = pElmDebugging->createChild("GuestDebug"); 8329 const char *pcszDebugProvider = NULL; 8330 const char *pcszIoProvider = NULL; 8331 8332 switch (dbg.enmDbgProvider) 8333 { 8334 case GuestDebugProvider_None: pcszDebugProvider = "None"; break; 8335 case GuestDebugProvider_GDB: pcszDebugProvider = "GDB"; break; 8336 case GuestDebugProvider_KD: pcszDebugProvider = "KD"; break; 8337 default: AssertFailed(); pcszDebugProvider = "None"; break; 8338 } 8339 8340 switch (dbg.enmIoProvider) 8341 { 8342 case GuestDebugIoProvider_None: pcszIoProvider = "None"; break; 8343 case GuestDebugIoProvider_TCP: pcszIoProvider = "TCP"; break; 8344 case GuestDebugIoProvider_UDP: pcszIoProvider = "UDP"; break; 8345 case GuestDebugIoProvider_IPC: pcszIoProvider = "IPC"; break; 8346 default: AssertFailed(); pcszIoProvider = "None"; break; 8347 } 8348 8349 pElmGuestDebug->setAttribute("provider", pcszDebugProvider); 8350 pElmGuestDebug->setAttribute("io", pcszIoProvider); 8351 pElmGuestDebug->setAttribute("address", dbg.strAddress); 8352 pElmGuestDebug->setAttribute("port", dbg.ulPort); 8285 8353 } 8286 8354 … … 8962 9030 #endif /* VBOX_WITH_VMNET */ 8963 9031 } 9032 9033 // VirtualBox 7.0 adds guest debug settings. 9034 if ( debugging.enmDbgProvider != GuestDebugProvider_None 9035 || debugging.enmIoProvider != GuestDebugIoProvider_None 9036 || debugging.strAddress.isNotEmpty() 9037 || debugging.ulPort != 0) 9038 { 9039 m->sv = SettingsVersion_v1_19; 9040 return; 9041 } 8964 9042 } 8965 9043
Note:
See TracChangeset
for help on using the changeset viewer.