7

Github Improve debuginfo for closures and async functions on Windows MSVC by wes...

 3 years ago
source link: https://github.com/rust-lang/rust/pull/83941
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Copy link

Member

wesleywiser commented 20 days ago

edited

The issue was that the resulting debuginfo was too complex for LLVM to
translate into CodeView records correctly. As a result, it simply
ignored the debuginfo which meant Windows debuggers could not display
any closed over variables when stepping inside a closure or async fn.

This fixes that by creating additional allocas on the stack so that
the resulting debuginfo is simple (just *my_variable.dbg.spill) and
LLVM can generate the correct CV records.

I also updated some of our existing tests to run in CDB to cover this case.

Before (closure):

After (closure):

Before (async):

After (async):

Fixes #83709


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK