Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

[x86/Linux] Fix unsupported architecture in seh-unwind.cpp#8262

Merged
janvorli merged 1 commit into
dotnet:masterfrom
seanshpark:x86pal08
Nov 24, 2016
Merged

[x86/Linux] Fix unsupported architecture in seh-unwind.cpp#8262
janvorli merged 1 commit into
dotnet:masterfrom
seanshpark:x86pal08

Conversation

@seanshpark
Copy link
Copy Markdown

@seanshpark seanshpark commented Nov 23, 2016

Fix compile error for x86/Linux

  • add ASSIGN_UNWIND_REGS in seh-unwind.cpp for x86
  • add CONTEXT_EXCEPTION_ACTIVE in pal.h for x86
  • add CONTEXT_XSTATE in pal.h for x86

@seanshpark
Copy link
Copy Markdown
Author

I don't know much about unwind so please guide me if anything needs to be fixed in this patch.

Comment thread src/pal/src/exception/seh-unwind.cpp Outdated
GetContextPointer(cursor, unwContext, UNW_X86_64_R14, &contextPointers->R14);
GetContextPointer(cursor, unwContext, UNW_X86_64_R15, &contextPointers->R15);
#elif defined(_X86_)
GetContextPointer(cursor, unwContext, UNW_X86_EBP, &contextPointers->Ebp);
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.

Please add the Esi and Edi

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

OK, thank you :)

unw_set_reg(cursor, UNW_X86_64_R14, winContext->R14);
unw_set_reg(cursor, UNW_X86_64_R15, winContext->R15);
#elif defined(_X86_)
unw_set_reg(cursor, UNW_REG_IP, winContext->Eip);
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.

I am sorry I have not noticed this before, but we need the Rsi and Rdi here as well (and the same in the UnwindContextToWinContext below)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Thank you :) It's OK to change again. This is a huge place.

Fix compile error for x86/Linux
- add ASSIGN_UNWIND_REGS in seh-unwind.cpp for x86
- add CONTEXT_EXCEPTION_ACTIVE in pal.h for x86
- add CONTEXT_XSTATE in pal.h for x86
@seanshpark
Copy link
Copy Markdown
Author

Done adding Esi and Edi.
And also added Esi, Edi to ASSIGN_UNWIND_REGS macro, but if not needed I'll remove them.

@seanshpark
Copy link
Copy Markdown
Author

@dotnet-bot test Windows_NT x86 compatjit Checked Build and Test please

Copy link
Copy Markdown
Member

@janvorli janvorli left a comment

Choose a reason for hiding this comment

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

LGTM, thank you!

@janvorli janvorli merged commit f85bf7c into dotnet:master Nov 24, 2016
@seanshpark seanshpark deleted the x86pal08 branch November 28, 2016 22:54
@karelz karelz modified the milestone: 2.0.0 Aug 28, 2017
picenka21 pushed a commit to picenka21/runtime that referenced this pull request Feb 18, 2022
…reclr#8262)

Fix compile error for x86/Linux
- add ASSIGN_UNWIND_REGS in seh-unwind.cpp for x86
- add CONTEXT_EXCEPTION_ACTIVE in pal.h for x86
- add CONTEXT_XSTATE in pal.h for x86

Commit migrated from dotnet/coreclr@f85bf7c
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants