Changeset 61759 in vbox for trunk/src/VBox/VMM
- Timestamp:
- Jun 20, 2016 8:35:25 AM (9 years ago)
- svn:sync-xref-src-repo-rev:
- 108148
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR3/DBGFR3Type.cpp
r61680 r61759 21 21 * The type management system is intended to ease retrieval of values from 22 22 * structures in the guest OS without having to take care of the size of pointers. 23 * 24 * @todo r=bird: We need to join this up with modules and address spaces. It 25 * cannot be standalone like this. Also, it must be comming from IPRT as 26 * there is no point in duplicating code (been there, done that with 27 * symbols and debug info already). This unfortunately means we need to 28 * find some common way of abstracting DWARF and Codeview type info so we 29 * can extend those debug info parsers to make type information available. 23 30 */ 24 31 … … 72 79 } while (0) 73 80 81 74 82 /********************************************************************************************************************************* 75 83 * Structures and Typedefs * 76 84 *********************************************************************************************************************************/ 77 78 85 /** 79 86 * DBGF registered type. … … 95 102 typedef DBGFTYPE *PDBGFTYPE; 96 103 104 97 105 /********************************************************************************************************************************* 98 106 * Internal Functions * 99 107 *********************************************************************************************************************************/ 100 101 108 static int dbgfR3TypeParseBufferByType(PUVM pUVM, PDBGFTYPE pType, uint8_t *pbBuf, size_t cbBuf, 102 109 PDBGFTYPEVAL *ppVal, size_t *pcbParsed); 103 110 111 104 112 /** 105 113 * Looks up a type by the identifier. … … 114 122 return (PDBGFTYPE)RTStrSpaceGet(pTypeSpace, pszType); 115 123 } 124 116 125 117 126 /** … … 180 189 break; 181 190 } 191 182 192 case DBGFTYPEVARIANT_UNION: 183 193 { … … 227 237 break; 228 238 } 239 229 240 case DBGFTYPEVARIANT_ALIAS: 230 241 { … … 244 255 break; 245 256 } 257 246 258 default: 247 AssertMsgFailedBreakStmt(("Invalid type variant: %d", pType->pReg->enmVariant), 248 rc = VERR_INVALID_STATE); 259 AssertMsgFailedReturn(("Invalid type variant: %d", pType->pReg->enmVariant), VERR_INVALID_STATE); 249 260 } 250 261 } … … 252 263 return rc; 253 264 } 265 254 266 255 267 /** … … 270 282 return VINF_SUCCESS; 271 283 } 284 272 285 273 286 /** … … 288 301 return VINF_SUCCESS; 289 302 } 303 290 304 291 305 /** … … 427 441 return rc; 428 442 } 443 429 444 430 445 /** … … 484 499 } 485 500 501 486 502 /** 487 503 * Registers a new built-in type … … 523 539 } 524 540 541 525 542 /** 526 543 * Registers builtin types. … … 557 574 return rc; 558 575 } 576 559 577 560 578 /** … … 700 718 } 701 719 720 702 721 /** 703 722 * Parses the given byte buffer and returns the value based no the type information. … … 749 768 return rc; 750 769 } 770 751 771 752 772 /** … … 787 807 } 788 808 809 789 810 /** 790 811 * Dumps one level of a type. … … 835 856 } 836 857 858 837 859 /** 838 860 * Initializes the type database. … … 861 883 } 862 884 885 863 886 /** 864 887 * Terminates the type database. … … 872 895 pUVM->dbgf.s.fTypeDbInitialized = false; 873 896 } 897 874 898 875 899 /** … … 919 943 } 920 944 945 921 946 /** 922 947 * Deregisters a previously registered type. … … 958 983 return rc; 959 984 } 985 960 986 961 987 /** … … 994 1020 } 995 1021 1022 996 1023 /** 997 1024 * Queries the size a given type would occupy in memory. … … 1030 1057 } 1031 1058 1059 1032 1060 /** 1033 1061 * Sets the size of the given type in bytes. … … 1082 1110 return rc; 1083 1111 } 1112 1084 1113 1085 1114 /** … … 1123 1152 } 1124 1153 1154 1125 1155 /** 1126 1156 * Returns the value of a memory buffer at the given address formatted for the given … … 1181 1211 } 1182 1212 1213 1183 1214 /** 1184 1215 * Frees all acquired resources of a value previously obtained with … … 1207 1238 MMR3HeapFree(pVal); 1208 1239 } 1240 1209 1241 1210 1242 /**
Note:
See TracChangeset
for help on using the changeset viewer.