microsoft / microsoft/vscode-cpptools
Missing/broken ˋ__int128ˋ support
Open
Nobody has claimed this yet.
debugger
Feature Request
more votes needed
Visual Studio
- Dominant language
- TypeScript
- Stars
- 6.2k
- Forks
- 1.7k
- Avg merge
- 14h 46m
- Merged PRs (30d)
- 61
Description
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 };
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue with the provided Rust binary project on Windows 11 and compare cpptools output for i128 and u128 values with the expected lldb output. Investigate the cpptools debugger handling of __int128 values and confirm that scalar and struct fields display their values and type names without memory-read errors or trailing whitespace.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, rust
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100