Changeset 84690 in vbox for trunk/src/VBox/Debugger
- Timestamp:
- Jun 5, 2020 10:54:19 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Debugger/DBGCGdbRemoteStub.cpp
r84660 r84690 984 984 cchStr = RTStrPrintf2(pachXmlCur, cbLeft, 985 985 "<reg name=\"%s\" bitsize=\"%u\" regnum=\"%u\" type=\"%s\" group=\"%s\"/>\n", 986 pReg->pszName, pReg->cBits, pReg->enmReg, pReg->pszType, pReg->pszGroup);986 pReg->pszName, pReg->cBits, i, pReg->pszType, pReg->pszGroup); 987 987 else 988 988 cchStr = RTStrPrintf2(pachXmlCur, cbLeft, 989 989 "<reg name=\"%s\" bitsize=\"%u\" regnum=\"%u\" type=\"%s\"/>\n", 990 pReg->pszName, pReg->cBits, pReg->enmReg, pReg->pszType);990 pReg->pszName, pReg->cBits, i, pReg->pszType); 991 991 992 992 if (cchStr > 0) … … 1018 1018 * @param enmReg The register to look for. 1019 1019 */ 1020 static const GDBREGDESC *dbgcGdbStubRegGet(DBGFREG enmReg) 1021 { 1022 for (uint32_t i = 0; i < RT_ELEMENTS(g_aGdbRegs); i++) 1023 { 1024 const struct GDBREGDESC *pReg = &g_aGdbRegs[i]; 1025 1026 if (pReg->enmReg == enmReg) 1027 return pReg; 1028 } 1020 static const GDBREGDESC *dbgcGdbStubRegGet(uint32_t idxReg) 1021 { 1022 if (RT_LIKELY(idxReg < RT_ELEMENTS(g_aGdbRegs))) 1023 return &g_aGdbRegs[idxReg]; 1029 1024 1030 1025 return NULL; … … 1496 1491 DBGFREGVAL RegVal; 1497 1492 DBGFREGVALTYPE enmType; 1498 DBGFREG enmReg = (DBGFREG)uReg; 1499 const GDBREGDESC *pReg = dbgcGdbStubRegGet(enmReg); 1493 const GDBREGDESC *pReg = dbgcGdbStubRegGet(uReg); 1500 1494 if (RT_LIKELY(pReg)) 1501 1495 { … … 1537 1531 if (RT_SUCCESS(rc)) 1538 1532 { 1539 DBGFREG enmReg = (DBGFREG)uReg; 1540 const GDBREGDESC *pReg = dbgcGdbStubRegGet(enmReg); 1533 const GDBREGDESC *pReg = dbgcGdbStubRegGet(uReg); 1541 1534 1542 1535 if (pReg) … … 1673 1666 for (;;) 1674 1667 exit(126); 1668 break; 1669 } 1670 case 'D': /* Detach */ 1671 { 1672 rc = dbgcGdbStubCtxReplySendOk(pThis); 1673 if (RT_SUCCESS(rc)) 1674 rc = VERR_DBGC_QUIT; 1675 1675 break; 1676 1676 }
Note:
See TracChangeset
for help on using the changeset viewer.