- Timestamp:
- Nov 4, 2016 2:12:36 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Debugger/DBGCEmulateCodeView.cpp
r64559 r64577 1509 1509 * @param cchWidth Maximum width of the text. 1510 1510 * @param pszText The text to write. 1511 * @param enmColor The color to use for drawing. 1511 * @param enmTextColor The color to use for drawing the text. 1512 * @param enmBorderColor The color to use for drawing the border. 1512 1513 */ 1513 1514 static void dbgcCmdUnassembleCfgDumpBbText(DBGCSCREEN hScreen, uint32_t uStartX, uint32_t uStartY, 1514 uint32_t cchWidth, const char *pszText, DBGCSCREENCOLOR enmColor) 1515 { 1516 dbgcScreenAsciiDrawCharacter(hScreen, uStartX, uStartY, '|', enmColor); 1517 dbgcScreenAsciiDrawCharacter(hScreen, uStartX + 1, uStartY, ' ', enmColor); 1518 dbgcScreenAsciiDrawString(hScreen, uStartX + 2, uStartY, pszText, enmColor); 1519 dbgcScreenAsciiDrawCharacter(hScreen, uStartX + cchWidth - 1, uStartY, '|', enmColor); 1515 uint32_t cchWidth, const char *pszText, 1516 DBGCSCREENCOLOR enmTextColor, DBGCSCREENCOLOR enmBorderColor) 1517 { 1518 dbgcScreenAsciiDrawCharacter(hScreen, uStartX, uStartY, '|', enmBorderColor); 1519 dbgcScreenAsciiDrawCharacter(hScreen, uStartX + 1, uStartY, ' ', enmTextColor); 1520 dbgcScreenAsciiDrawString(hScreen, uStartX + 2, uStartY, pszText, enmTextColor); 1521 dbgcScreenAsciiDrawCharacter(hScreen, uStartX + cchWidth - 1, uStartY, '|', enmBorderColor); 1520 1522 } 1521 1523 … … 1545 1547 DBGFR3FlowBbQueryInstr(pDumpBb->hFlowBb, i, NULL, NULL, &pszInstr); 1546 1548 dbgcCmdUnassembleCfgDumpBbText(hScreen, pDumpBb->uStartX, uStartY + i, 1547 pDumpBb->cchWidth, pszInstr, DBGCSCREENCOLOR_DEFAULT); 1549 pDumpBb->cchWidth, pszInstr, DBGCSCREENCOLOR_DEFAULT, 1550 enmColor); 1548 1551 } 1549 1552 uStartY += cInstr; … … 1555 1558 if (pszErr) 1556 1559 dbgcCmdUnassembleCfgDumpBbText(hScreen, pDumpBb->uStartX, uStartY, 1557 pDumpBb->cchWidth, pszErr, enmColor); 1560 pDumpBb->cchWidth, pszErr, enmColor, 1561 enmColor); 1558 1562 uStartY++; 1559 1563 } … … 1692 1696 { 1693 1697 PDBGCFLOWBBDUMP pDumpBb = &paDumpBb[i]; 1698 DBGFFLOWBBENDTYPE enmEndType = DBGFR3FlowBbGetType(pDumpBb->hFlowBb); 1694 1699 1695 1700 /* Incomplete blocks don't have a successor. */ … … 1697 1702 continue; 1698 1703 1699 switch ( DBGFR3FlowBbGetType(pDumpBb->hFlowBb))1704 switch (enmEndType) 1700 1705 { 1701 1706 case DBGFFLOWBBENDTYPE_EXIT: … … 1715 1720 } 1716 1721 1722 DBGCSCREENCOLOR enmColor = enmEndType == DBGFFLOWBBENDTYPE_UNCOND_JMP 1723 ? DBGCSCREENCOLOR_YELLOW_BRIGHT 1724 : DBGCSCREENCOLOR_GREEN_BRIGHT; 1725 1717 1726 /* 1718 1727 * Use the right side for targets with higher addresses, … … 1729 1738 /* Draw the arrow pointing to the target block. */ 1730 1739 dbgcScreenAsciiDrawCharacter(hScreen, pDumpBbTgt->uStartX - 1, pDumpBbTgt->uStartY, 1731 '>', DBGCSCREENCOLOR_GREEN_BRIGHT);1740 '>', enmColor); 1732 1741 /* Draw the horizontal line. */ 1733 1742 dbgcScreenAsciiDrawLineHorizontal(hScreen, uXVerLine + 1, pDumpBbTgt->uStartX - 2, 1734 pDumpBbTgt->uStartY, '-', DBGCSCREENCOLOR_GREEN_BRIGHT);1743 pDumpBbTgt->uStartY, '-', enmColor); 1735 1744 dbgcScreenAsciiDrawCharacter(hScreen, uXVerLine, pDumpBbTgt->uStartY, '+', 1736 DBGCSCREENCOLOR_GREEN_BRIGHT);1745 enmColor); 1737 1746 /* Draw the vertical line down to the source block. */ 1738 1747 dbgcScreenAsciiDrawLineVertical(hScreen, uXVerLine, pDumpBbTgt->uStartY + 1, uYHorLine - 1, 1739 '|', DBGCSCREENCOLOR_GREEN_BRIGHT);1740 dbgcScreenAsciiDrawCharacter(hScreen, uXVerLine, uYHorLine, '+', DBGCSCREENCOLOR_GREEN_BRIGHT);1748 '|', enmColor); 1749 dbgcScreenAsciiDrawCharacter(hScreen, uXVerLine, uYHorLine, '+', enmColor); 1741 1750 /* Draw the horizontal connection between the source block and vertical part. */ 1742 1751 dbgcScreenAsciiDrawLineHorizontal(hScreen, uXVerLine + 1, pDumpBb->uStartX - 1, 1743 uYHorLine, '-', DBGCSCREENCOLOR_GREEN_BRIGHT);1752 uYHorLine, '-', enmColor); 1744 1753 1745 1754 } … … 1753 1762 /* Draw the horizontal line. */ 1754 1763 dbgcScreenAsciiDrawLineHorizontal(hScreen, pDumpBb->uStartX + pDumpBb->cchWidth, 1755 uXVerLine - 1, uYHorLine, '-', DBGCSCREENCOLOR_GREEN_BRIGHT);1756 dbgcScreenAsciiDrawCharacter(hScreen, uXVerLine, uYHorLine, '+', DBGCSCREENCOLOR_GREEN_BRIGHT);1764 uXVerLine - 1, uYHorLine, '-', enmColor); 1765 dbgcScreenAsciiDrawCharacter(hScreen, uXVerLine, uYHorLine, '+', enmColor); 1757 1766 /* Draw the vertical line down to the target block. */ 1758 1767 dbgcScreenAsciiDrawLineVertical(hScreen, uXVerLine, uYHorLine + 1, pDumpBbTgt->uStartY - 1, 1759 '|', DBGCSCREENCOLOR_GREEN_BRIGHT);1768 '|', enmColor); 1760 1769 /* Draw the horizontal connection between the target block and vertical part. */ 1761 1770 dbgcScreenAsciiDrawLineHorizontal(hScreen, pDumpBbTgt->uStartX + pDumpBbTgt->cchWidth, 1762 uXVerLine, pDumpBbTgt->uStartY, '-', DBGCSCREENCOLOR_GREEN_BRIGHT);1771 uXVerLine, pDumpBbTgt->uStartY, '-', enmColor); 1763 1772 dbgcScreenAsciiDrawCharacter(hScreen, uXVerLine, pDumpBbTgt->uStartY, '+', 1764 DBGCSCREENCOLOR_GREEN_BRIGHT);1773 enmColor); 1765 1774 /* Draw the arrow pointing to the target block. */ 1766 1775 dbgcScreenAsciiDrawCharacter(hScreen, pDumpBbTgt->uStartX + pDumpBbTgt->cchWidth, 1767 pDumpBbTgt->uStartY, '<', DBGCSCREENCOLOR_GREEN_BRIGHT);1776 pDumpBbTgt->uStartY, '<', enmColor); 1768 1777 } 1769 1778 break;
Note:
See TracChangeset
for help on using the changeset viewer.