Skip to content

Fix debuginfo for parameters passed via the ScalarPair abi on Windows - #88629

Merged
bors merged 4 commits into
rust-lang:masterfrom
wesleywiser:fix_debuginfo_for_scalarpair_params
Sep 22, 2021
Merged

Fix debuginfo for parameters passed via the ScalarPair abi on Windows#88629
bors merged 4 commits into
rust-lang:masterfrom
wesleywiser:fix_debuginfo_for_scalarpair_params

Conversation

@wesleywiser

Copy link
Copy Markdown
Member

Mark all of these as locals so the debugger does not try to interpret
them as being a pointer to the value. This extends the approach used
in #81898.

Fixes#88625

@wesleywiserwesleywiser added A-debuginfo Area: Debugging information in compiled programs (DWARF, PDB, etc.) O-windows-msvc Toolchain: MSVC, Operating system: Windows labels Sep 3, 2021
@rust-highfive

Copy link
Copy Markdown
Contributor

r? @oli-obk

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfiverust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 3, 2021

@oli-obkoli-obk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When adding instrumentation to a function I usually also go through the function and update all debug! invocations to their tracing equivalent

- debug!("hello: foo = {:?}", foo);+ debug!(?foo, "hello");

Not saying you have to do this, that's just what I've been doing ^^.

Comment threadcompiler/rustc_codegen_ssa/src/mir/mod.rs Outdated
@oli-obk

Copy link
Copy Markdown
Contributor

@bors r+

@bors

bors commented Sep 4, 2021

Copy link
Copy Markdown
Collaborator

📌 Commit 7bbdc884a2258f96fcff8fcea3d4d6e2acf6e294 has been approved by oli-obk

@borsbors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 4, 2021
@bors

bors commented Sep 6, 2021

Copy link
Copy Markdown
Collaborator

⌛ Testing commit 7bbdc884a2258f96fcff8fcea3d4d6e2acf6e294 with merge f60df93e93ea66543bb55346f0f264a9bb70da07...

@bors

bors commented Sep 6, 2021

Copy link
Copy Markdown
Collaborator

💔 Test failed - checks-actions

@borsbors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Sep 6, 2021
@rust-log-analyzer

This comment has been minimized.

@wesleywiser
wesleywiserforce-pushed the fix_debuginfo_for_scalarpair_params branch from 7bbdc88 to 3195401CompareSeptember 7, 2021 15:05
@wesleywiser

Copy link
Copy Markdown
MemberAuthor

Rebased and resolved a merge conflict that occurred due to #88499.

@bors r=oli-obk

@bors

bors commented Sep 7, 2021

Copy link
Copy Markdown
Collaborator

📌 Commit 3195401 has been approved by oli-obk

@borsbors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 7, 2021
Manishearth added a commit to Manishearth/rust that referenced this pull request Sep 12, 2021
…rpair_params, r=oli-obk
Fix debuginfo for parameters passed via the ScalarPair abi on Windows
Mark all of these as locals so the debugger does not try to interpret
them as being a pointer to the value. This extends the approach used
in rust-lang#81898.
Fixesrust-lang#88625
@Manishearth

Copy link
Copy Markdown
Member

@bors r-

#88877

---- [debuginfo-cdb] debuginfo\msvc-scalarpair-params.rs stdout ----
error: line not found in debugger output: [len] : 0x14 [Type: unsigned __int64]
status: exit code: 0
command: PATH="D:\a\rust\rust\build\i686-pc-windows-msvc\stage2\lib\rustlib\i686-pc-windows-msvc\lib;C:\Program Files (x86)\Windows Kits\10\bin\x64;C:\Program Files (x86)\Windows Kits\10\bin\10.0.20348.0\x64;C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\bin\HostX64\x64;C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\bin\HostX64\x86;D:\a\rust\rust\build\i686-pc-windows-msvc\stage0-bootstrap-tools\i686-pc-windows-msvc\release\deps;D:\a\rust\rust\build\i686-pc-windows-msvc\stage0\bin;D:\a\rust\rust\ninja;D:\a\rust\rust\msys2\mingw32\bin;C:\hostedtoolcache\windows\Python\3.9.7\x64\Scripts;C:\hostedtoolcache\windows\Python\3.9.7\x64;C:\msys64\usr\bin;D:\a\rust\rust\sccache;C:\Users\runneradmin\.dotnet\tools;C:\Program Files\MongoDB\Server\5.0\bin;C:\aliyun-cli;C:\vcpkg;C:\cf-cli;C:\Program Files (x86)\NSIS;C:\tools\zstd;C:\Program Files\Mercurial;C:\hostedtoolcache\windows\stack\2.7.3\x64;C:\tools\ghc-9.0.1\bin;C:\Program Files\dotnet;C:\mysql-5.7.21-winx64\bin;C:\Program Files\R\R-4.1.1\bin\x64;C:\SeleniumWebDrivers\GeckoDriver;C:\Program Files (x86)\sbt\bin;C:\Rust\.cargo\bin;C:\Program Files (x86)\GitHub CLI;C:\Program Files\Git\bin;C:\Program Files (x86)\pipx_bin;C:\hostedtoolcache\windows\go\1.15.15\x64\bin;C:\hostedtoolcache\windows\Python\3.7.9\x64\Scripts;C:\hostedtoolcache\windows\Python\3.7.9\x64;C:\hostedtoolcache\windows\Ruby\2.5.9\x64\bin;C:\hostedtoolcache\windows\Java_Adopt_jdk\8.0.302-8\x64\bin;C:\npm\prefix;C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\wbin;C:\ProgramData\kind;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Windows\System32\OpenSSH;C:\ProgramData\Chocolatey\bin;C:\Program Files\Docker;C:\Program Files\PowerShell\7;C:\Program Files\Microsoft\Web Platform Installer;C:\Program Files\dotnet;C:\Program Files\Microsoft SQL Server\130\Tools\Binn;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit;C:\Program Files (x86)\Microsoft SQL Server\110\DTS\Binn;C:\Program Files (x86)\Microsoft SQL Server\120\DTS\Binn;C:\Program Files (x86)\Microsoft SQL Server\130\DTS\Binn;C:\Program Files (x86)\Microsoft SQL Server\140\DTS\Binn;C:\Program Files (x86)\Microsoft SQL Server\150\DTS\Binn;C:\Program Files\nodejs;C:\Program Files\OpenSSL\bin;C:\Strawberry\c\bin;C:\Strawberry\perl\site\bin;C:\Strawberry\perl\bin;C:\ProgramData\chocolatey\lib\pulumi\tools\Pulumi\bin;C:\Program Files\TortoiseSVN\bin;C:\Program Files\OpenJDK\jdk-16.0.2\bin;C:\Program Files\CMake\bin;C:\ProgramData\chocolatey\lib\maven\apache-maven-3.8.2\bin;C:\Program Files\Microsoft Service Fabric\bin\Fabric\Fabric.Code;C:\Program Files\Microsoft SDKs\Service Fabric\Tools\ServiceFabricLocalClusterManager;C:\Program Files\Git\cmd;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Program Files\GVFS;C:\tools\php;C:\Program Files (x86)\sbt\bin;C:\SeleniumWebDrivers\ChromeDriver;C:\SeleniumWebDrivers\EdgeDriver;C:\Program Files\Amazon\AWSCLIV2;C:\Program Files\Amazon\SessionManagerPlugin\bin;C:\Program Files\Amazon\AWSSAMCLI\bin;C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\bin;C:\Program Files (x86)\Microsoft BizTalk Server;C:\Users\runneradmin\AppData\Local\Microsoft\WindowsApps" "C:\\Program Files (x86)\\Windows Kits\\10\\Debuggers\\x86\\cdb.exe" "-lines" "-cf" "D:\\a\\rust\\rust\\build\\i686-pc-windows-msvc\\test\\debuginfo\\msvc-scalarpair-params.cdb\\msvc-scalarpair-params.debugger.script" "D:\\a\\rust\\rust\\build\\i686-pc-windows-msvc\\test\\debuginfo\\msvc-scalarpair-params.cdb\\a.exe"

@borsbors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Sep 12, 2021
Mark all of these as locals so the debugger does not try to interpret
them as being a pointer to the value. This extends the approach used in
PR rust-lang#81898.
@wesleywiser
wesleywiserforce-pushed the fix_debuginfo_for_scalarpair_params branch from 3195401 to a6c642aCompareSeptember 13, 2021 14:51
@wesleywiser

Copy link
Copy Markdown
MemberAuthor

Resolved type name for len property on 32-bit Windows.

@bors r=oli-obk

@bors

bors commented Sep 13, 2021

Copy link
Copy Markdown
Collaborator

📌 Commit a6c642a has been approved by oli-obk

@borsbors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Sep 13, 2021
@bors

bors commented Sep 20, 2021

Copy link
Copy Markdown
Collaborator

⌛ Testing commit a6c642a with merge 384ced8504e71333555a67050fff22e7eddd2df7...

@bors

bors commented Sep 20, 2021

Copy link
Copy Markdown
Collaborator

💥 Test timed out

@borsbors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Sep 20, 2021
@wesleywiser

Copy link
Copy Markdown
MemberAuthor

@bors retry

@borsbors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 20, 2021
@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

A job failed! Check out the build log: (web)(plain)

Click to see the possible cause of the failure (guessed by this bot)

@bors

bors commented Sep 22, 2021

Copy link
Copy Markdown
Collaborator

⌛ Testing commit a6c642a with merge 5fd6f3b...

@bors

bors commented Sep 22, 2021

Copy link
Copy Markdown
Collaborator

☀️ Test successful - checks-actions
Approved by: oli-obk
Pushing 5fd6f3b to master...

@borsbors added the merged-by-bors This PR was explicitly merged by bors. label Sep 22, 2021
@bors
bors merged commit 5fd6f3b into rust-lang:masterSep 22, 2021
@rustbotrustbot added this to the 1.57.0 milestone Sep 22, 2021
@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (5fd6f3b): comparison url.

Summary: This benchmark run did not return any relevant changes.

If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf.

@rustbot label: -perf-regression

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-debuginfoArea: Debugging information in compiled programs (DWARF, PDB, etc.)merged-by-borsThis PR was explicitly merged by bors.O-windows-msvcToolchain: MSVC, Operating system: WindowsS-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Arguments passed as ScalarPairs do not work correctly with Windows debuggers

8 participants

@wesleywiser@rust-highfive@oli-obk@bors@rust-log-analyzer@Manishearth@rust-timer@rustbot