vscode-cpptools
vscode-cpptools copied to clipboard
Missing/broken ˋ__int128ˋ support
Environment
- OS and version:
Windows 11 - VS Code:
1.104.1 - C/C++ extension:
1.27.7
Description
Display of __int128 values seems broken/not supported in cpptools (Windows) in comparison to lldb (Linux).
Reproduction
- Create a new Rust binary project:
cargo new crate_name - Modify
src/main.rs:struct I64(i64); struct U64(u64); struct I128(i128); struct U128(u128); fn main() { let i64_1 = 123_i64; let i64_2 = I64(123); let i128_1 = 123_i128; let i128_2 = I128(123); let u128_1 = 123_u128; let u128_2 = U128(123); let u64_1 = 123_u64; let u64_2 = U64(123); println!(); } - Set a breakpoint at
println!()and debug the program by clicking on the "Debug" label next tofn main().
Expected result (output of lldb on Linux)
Variables
Locals
i64_1 = 123 (long)
i64_2 = {__0:123} (crate_name::I64)
__0 = 123 (long)
i128_1 = 123 (__int128)
i128_2 = {__0:123} (crate_name::I128)
__0 = 123 (__int128)
u128_1 = 123 (unsigned __int128)
u128_2 = {__0:123} (crate_name::U128)
__0 = 123 (unsigned __int128)
u64_1 = 123 (unsigned long)
u64_2 = {__0:123} (crate_name::U64)
__0 = 123 (unsigned long)
Actual result (output of cpptools on Windows)
Variables
Locals
i64_1 = 123 (__int64)
i64_2 = {__0=123 } (crate_name::I64)
__0 = 123 (__int64)
i128_1 = An unspecified error has occurred. (i128_1)
i128_2 = {__0=??? } (crate_name::I128)
__0 = <Unable to read memory> (__0)
u64_1 = 123 (unsigned __int64)
u64_2 = {__0=123 } (crate_name::U64)
__0 = 123 (unsigned __int64)
u128_1 = An unspecified error has occurred. (u128_1)
u128_2 = {__0=??? } (crate_name::U128)
__0 = <Unable to read memory> (__0)
Differences (normalized)
- Lines 9 & 12:
An unspecified error has occurred.instead of123. - Lines 10 & 13:
???instead of123. - Lines 11 & 14:
<Unable to read memory>instead of123. - Lines 9, 11, 12, 14:
(variable name)instead of(type name), e.g.(__0)instead of(__int128). - Lines 4, 7, 10, 13: Trailing whitespace after the variable value:
{__0:123 }instead of{__0:123}.
More information
IDA (disassembler) extracts the following structs from the PDB:
00000000 struct crate_name::I64 // sizeof=0x8
00000000 {
00000000 __int64 __0;
00000008 };
00000000 struct crate_name::U64 // sizeof=0x8
00000000 {
00000000 unsigned __int64 __0;
00000008 };
00000000 struct crate_name::I128 // sizeof=0x10
00000000 {
00000000 __int128 __0;
00000010 };
00000000 struct crate_name::U128 // sizeof=0x10
00000000 {
00000000 unsigned __int128 __0;
00000010 };