about summary refs log tree commit diff
path: root/library/std/src/sys/unix/stack_overflow.rs
diff options
context:
space:
mode:
authorDylan DPC <dylan.dpc@gmail.com>2021-02-17 23:51:17 +0100
committerGitHub <noreply@github.com>2021-02-17 23:51:17 +0100
commitf79be2c6de6a2f1b002d3f1f3fd7d9ca2aa8905a (patch)
treefd3758275f0cd5f99e0d54dd9190bdc5479cb2b1 /library/std/src/sys/unix/stack_overflow.rs
parent91e5384fc0d4b7babc360dca12c5a9d88332f13b (diff)
parent615fd141bde1e4319f95c3ea2981a1f5a8aa5dbd (diff)
downloadrust-f79be2c6de6a2f1b002d3f1f3fd7d9ca2aa8905a.tar.gz
rust-f79be2c6de6a2f1b002d3f1f3fd7d9ca2aa8905a.zip
Rollup merge of #81898 - nanguye2496:nanguye2496/fix_str_and_slice_visualization, r=varkor
Fix debug information for function arguments of type &str or slice.

Issue details:
When lowering MIR to LLVM IR, the compiler decomposes every &str and slice argument into a data pointer and a usize. Then, the original argument is reconstructed from the pointer and the usize arguments in the body of the function that owns it. Since the original argument is declared in the body of a function, it should be marked as a LocalVariable instead of an ArgumentVairable. This confusion causes MSVC debuggers unable to visualize &str and slice arguments correctly. (See https://github.com/rust-lang/rust/issues/81894 for more details).

Fix details:
Making sure that the debug variable for every &str and slice argument is marked as LocalVariable instead of ArgumentVariable in computing_per_local_var_debug_info. This change has been verified on VS Code debugger, VS debugger, WinDbg and LLDB.
Diffstat (limited to 'library/std/src/sys/unix/stack_overflow.rs')
0 files changed, 0 insertions, 0 deletions