Changeset 37966 in vbox for trunk/src/VBox
- Timestamp:
- Jul 14, 2011 1:39:15 PM (13 years ago)
- Location:
- trunk/src/VBox/Runtime
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/common/string/strformatrt.cpp
r37965 r37966 1034 1034 { \ 1035 1035 cchOutput += pfnOutput(pvArgOutput, !cPrinted ? "{unkn=" : ",unkn=", 6); \ 1036 cch = RTStrFormatNumber(&szBuf[0], (a_uVal), 16, 8, -1, fFlags); \1036 cch = RTStrFormatNumber(&szBuf[0], (a_uVal), 16, 1, -1, fFlags); \ 1037 1037 cchOutput += pfnOutput(pvArgOutput, szBuf, cch); \ 1038 1038 cPrinted++; \ … … 1058 1058 uint64_t cr0 = va_arg(*pArgs, uint64_t); 1059 1059 fFlags |= RTSTR_F_64BIT; 1060 cch = RTStrFormatNumber(&szBuf[0], cr0, 16, 8, -1, fFlags );1060 cch = RTStrFormatNumber(&szBuf[0], cr0, 16, 8, -1, fFlags | RTSTR_F_ZEROPAD); 1061 1061 cchOutput += pfnOutput(pvArgOutput, szBuf, cch); 1062 1062 REG_OUT_BIT(cr0, X86_CR0_PE, "PE"); … … 1077 1077 uint64_t cr4 = va_arg(*pArgs, uint64_t); 1078 1078 fFlags |= RTSTR_F_64BIT; 1079 cch = RTStrFormatNumber(&szBuf[0], cr4, 16, 8, -1, fFlags );1079 cch = RTStrFormatNumber(&szBuf[0], cr4, 16, 8, -1, fFlags | RTSTR_F_ZEROPAD); 1080 1080 cchOutput += pfnOutput(pvArgOutput, szBuf, cch); 1081 1081 REG_OUT_BIT(cr4, X86_CR4_VME, "VME"); -
trunk/src/VBox/Runtime/testcase/tstRTStrFormat.cpp
r37965 r37966 593 593 */ 594 594 RTTestSub(hTest, "x86 register format types (%RAx86[*])"); 595 CHECK42("%'RU64", _1E, "1 152 921 504 606 846 976");596 595 CHECK42("%RAx86[cr0]", UINT64_C(0x80000011), "80000011{PE,ET,PG}"); 596 CHECK42("%RAx86[cr0]", UINT64_C(0x80000001), "80000001{PE,PG}"); 597 CHECK42("%RAx86[cr0]", UINT64_C(0x00000001), "00000001{PE}"); 598 CHECK42("%RAx86[cr0]", UINT64_C(0x80000000), "80000000{PG}"); 597 599 CHECK42("%RAx86[cr4]", UINT64_C(0x80000001), "80000001{VME,unkn=80000000}"); 598 600 CHECK42("%#RAx86[cr4]", UINT64_C(0x80000001), "0x80000001{VME,unkn=0x80000000}");
Note:
See TracChangeset
for help on using the changeset viewer.