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

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

Merged
merged 1 commit into from
Nov 24, 2016
Merged

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

merged 1 commit into from
Nov 24, 2016

Conversation

seanshpark
Copy link

@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
Author

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

@@ -196,6 +212,9 @@ static void GetContextPointers(unw_cursor_t *cursor, unw_context_t *unwContext,
GetContextPointer(cursor, unwContext, UNW_X86_64_R13, &contextPointers->R13);
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
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
Author

Choose a reason for hiding this comment

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

OK, thank you :)

@@ -122,6 +128,11 @@ static void WinContextToUnwindCursor(CONTEXT *winContext, unw_cursor_t *cursor)
unw_set_reg(cursor, UNW_X86_64_R13, winContext->R13);
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
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
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
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
Author

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

Copy link
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