Skip to content

Print inlined functions on Windows - #47252

Merged
alexcrichton merged 1 commit into
rust-lang:masterfrom
Zoxc:backtrace-win
Jan 26, 2018
Merged

Print inlined functions on Windows#47252
alexcrichton merged 1 commit into
rust-lang:masterfrom
Zoxc:backtrace-win

Conversation

@Zoxc

@ZoxcZoxc commented Jan 7, 2018

Copy link
Copy Markdown
Contributor

Split from #45637

r? @alexcrichton

Comment threadsrc/libstd/sys_common/backtrace.rs Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Did these leak in by accident? I think tidy failed to compile due to these maybe?

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

I forgot to commit my code...

@alexcrichton

Copy link
Copy Markdown
Member

Can this test also be updated?

@kennytmkennytm added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Jan 8, 2018
@alexcrichton

Copy link
Copy Markdown
Member

Was it possible to update the relevant test to avoid the special-casing of msvc?

@Zoxc

Zoxc commented Jan 8, 2018

Copy link
Copy Markdown
ContributorAuthor

It looks like location information disappeared from x86-32. I'll have to look into that.

@kennytm

Copy link
Copy Markdown
Member

Hi @Zoxc! Have you checked the issue of 32-bit x86?

@Zoxc

Zoxc commented Jan 17, 2018

Copy link
Copy Markdown
ContributorAuthor

I checked that similar code does work for C++. There might be some issue with either the FFI or debug information Rust generates. I'll try to use the C++ code to generate a stack trace for Rust code.

@Zoxc

Zoxc commented Jan 25, 2018

Copy link
Copy Markdown
ContributorAuthor

I used a pointer instead of a u64 in SymGetLineFromInlineContext, which messed up the ABI on 32-bit platforms.

@Zoxc
Zoxcforce-pushed the backtrace-win branch 2 times, most recently from e059019 to 5253babCompareJanuary 25, 2018 08:29
@Zoxc

Zoxc commented Jan 25, 2018

Copy link
Copy Markdown
ContributorAuthor

This is now ready to be merged. The backtrace test still doesn't pass because the debug information we emit is not entirely correct.

@kennytmkennytm added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jan 25, 2018
@alexcrichton

Copy link
Copy Markdown
Member

@bors: r+

Ok, thanks for investigating!

@bors

bors commented Jan 25, 2018

Copy link
Copy Markdown
Collaborator

📌 Commit 5253bab has been approved by alexcrichton

@kennytmkennytm 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 Jan 25, 2018
@bors

bors commented Jan 25, 2018

Copy link
Copy Markdown
Collaborator

⌛ Testing commit 5253bab with merge 2b6205e...

bors added a commit that referenced this pull request Jan 25, 2018
@bors

bors commented Jan 25, 2018

Copy link
Copy Markdown
Collaborator

💔 Test failed - status-travis

@kennytm

kennytm commented Jan 25, 2018

Copy link
Copy Markdown
Member

dist-various-2 failed, cannot build on CloudABI, legit.

Just a missing field.

[00:47:16] warning: dropping unsupported crate type `dylib` for target `x86_64-unknown-cloudabi`
[00:47:16] [00:47:19] error[E0063]: missing field `inline_context` in initializer of `sys_common::backtrace::Frame`
[00:47:19] --> libstd/sys/cloudabi/backtrace.rs:77:29
[00:47:19] |
[00:47:19] 77 | cx.frames[cx.idx] = Frame {
[00:47:19] | ^^^^^ missing `inline_context`
[00:47:19] [00:47:21] error: aborting due to previous error
[00:47:21] [00:47:21] error: Could not compile `std`.

@kennytmkennytm 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 Jan 25, 2018
@Zoxc

Zoxc commented Jan 26, 2018

Copy link
Copy Markdown
ContributorAuthor

@bors r=alexcrichton

@bors

bors commented Jan 26, 2018

Copy link
Copy Markdown
Collaborator

📌 Commit 634f8cc has been approved by alexcrichton

@kennytmkennytm 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 Jan 26, 2018
@bors

bors commented Jan 26, 2018

Copy link
Copy Markdown
Collaborator

⌛ Testing commit 634f8cc with merge a97cd17...

bors added a commit that referenced this pull request Jan 26, 2018
@bors

bors commented Jan 26, 2018

Copy link
Copy Markdown
Collaborator

💔 Test failed - status-appveyor

@alexcrichton
alexcrichton merged commit 634f8cc into rust-lang:masterJan 26, 2018
@alexcrichton

Copy link
Copy Markdown
Member

Gonna merge anyway since all tests passed and it's just the appveyor timeout.

bors pushed a commit that referenced this pull request Jun 29, 2018
PR #47252 switched stack inspection functions of dbghelp.dll
to their newer alternatives that also capture inlined context.
Unfortunately, said new alternatives are not present in older
dbghelp.dll versions.
In particular Windows 7 at the time of writing has dbghelp.dll
version 6.1.7601 from 2010, that lacks StackWalkEx and friends.
Fixes#50138
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-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.

4 participants

@Zoxc@alexcrichton@kennytm@bors