| 1585 | } |
| 1586 | |
| 1587 | void UpdateWatchedVariables() |
| 1588 | { |
| 1589 | char name[256]; |
| 1590 | HTREEITEM elem = TreeView_GetRoot(hWatch); |
| 1591 | while(elem) |
| 1592 | { |
| 1593 | TVITEMEX item; |
| 1594 | memset(&item, 0, sizeof(item)); |
| 1595 | item.mask = TVIF_HANDLE | TVIF_PARAM; |
| 1596 | item.hItem = elem; |
| 1597 | TreeView_GetItem(hVars, &item); |
| 1598 | |
| 1599 | item.mask = TVIF_TEXT; |
| 1600 | item.hItem = elem; |
| 1601 | item.cchTextMax = 0; |
| 1602 | |
| 1603 | TreeItemExtra extra = tiWatch[item.lParam]; |
| 1604 | const ExternTypeInfo &type = *extra.type; |
| 1605 | |
| 1606 | char *it = name; |
| 1607 | memset(name, 0, 256); |
| 1608 | it += safeprintf(it, 256 - int(it - name), "0x%x: %s %s", extra.address, codeSymbols + type.offsetToName, extra.name); |
| 1609 | |
| 1610 | if(type.subCat == ExternTypeInfo::CAT_NONE || type.subCat == ExternTypeInfo::CAT_POINTER) |
| 1611 | it += safeprintf(it, 256 - int(it - name), " = %s", GetBasicVariableInfo(type, (char*)extra.address)); |
| 1612 | else if(&type == &codeTypes[8]) // for typeid |
| 1613 | it += safeprintf(it, 256 - int(it - name), " = %s", codeSymbols + codeTypes[*(int*)(extra.address)].offsetToName); |
| 1614 | |
| 1615 | item.pszText = name; |
| 1616 | TreeView_SetItem(hWatch, &item); |
| 1617 | FillVariableInfo(type, (char*)extra.address, elem, true); |
| 1618 | elem = TreeView_GetNextSibling(hWatch, elem); |
| 1619 | } |
| 1620 | } |
| 1621 | |
| 1622 | struct RunResult |
| 1623 | { |
no test coverage detected