Changeset 86105 in vbox for trunk/src/VBox/Debugger/DBGCTcp.cpp
- Timestamp:
- Sep 13, 2020 8:28:59 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Debugger/DBGCTcp.cpp
r84627 r86105 223 223 PUVM pUVM = (PUVM)pvUser; 224 224 PCFGMNODE pKey = CFGMR3GetChild(CFGMR3GetRootU(pUVM), "DBGC"); 225 bool fGdbStub = false;226 int rc = CFGMR3Query BoolDef(pKey, "GdbStub", &fGdbStub, false);227 if (RT_FAILURE(rc)) 228 return VM_SET_ERROR_U(pUVM, rc, "Configuration error: Failed querying \"DBGC/ GdbStub\"");225 char *pszStubType = NULL; 226 int rc = CFGMR3QueryStringAllocDef(pKey, "StubType", &pszStubType, "Native"); 227 if (RT_FAILURE(rc)) 228 return VM_SET_ERROR_U(pUVM, rc, "Configuration error: Failed querying \"DBGC/StubType\""); 229 229 230 230 /* … … 234 234 DbgcTcp.Back.pfnInput = dbgcTcpBackInput; 235 235 DbgcTcp.Back.pfnRead = dbgcTcpBackRead; 236 if (fGdbStub)237 DbgcTcp.Back.pfnWrite = dbgcTcpBackWriteRaw;238 else239 DbgcTcp.Back.pfnWrite = dbgcTcpBackWrite;240 236 DbgcTcp.Back.pfnSetReady = dbgcTcpBackSetReady; 241 237 DbgcTcp.fAlive = true; 242 238 DbgcTcp.Sock = Sock; 243 if (fGdbStub) 239 240 if (!RTStrICmp(pszStubType, "gdb")) 241 { 242 DbgcTcp.Back.pfnWrite = dbgcTcpBackWriteRaw; 244 243 rc = dbgcGdbStubCreate(pUVM, &DbgcTcp.Back, 0); 244 } 245 else if (!RTStrICmp(pszStubType, "kd")) 246 { 247 DbgcTcp.Back.pfnWrite = dbgcTcpBackWriteRaw; 248 rc = dbgcKdStubCreate(pUVM, &DbgcTcp.Back, 0); 249 } 250 else if (!RTStrICmp(pszStubType, "native")) 251 { 252 DbgcTcp.Back.pfnWrite = dbgcTcpBackWrite; 253 rc = DBGCCreate(pUVM, &DbgcTcp.Back, 0); 254 } 245 255 else 246 rc = DBGCCreate(pUVM, &DbgcTcp.Back, 0); 256 rc = VM_SET_ERROR_U(pUVM, VERR_INVALID_PARAMETER, "Configuration error: \"DBGC/StubType\" contains an invalid type"); 257 247 258 LogFlow(("dbgcTcpConnection: disconnect rc=%Rrc\n", rc)); 248 259 return rc;
Note:
See TracChangeset
for help on using the changeset viewer.