Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RISC-V] Fixing createdump for RISC-V #93374

Merged
merged 4 commits into from
Oct 23, 2023
Merged

Conversation

clamp03
Copy link
Member

@clamp03 clamp03 commented Oct 12, 2023

Initial patch for createdump. Fixed errors when to make dumps in RISC-V only.
I didn't check generated dump is correct yet. I will check later when others are prepared.

Part of #84834
cc @wscho77 @HJLeee @JongHeonChoi @t-mustafin @gbalykov @tomeksowi @sirntar @yurai007

@ghost ghost added the community-contribution Indicates that the PR has been added by a community member label Oct 12, 2023
@ghost
Copy link

ghost commented Oct 12, 2023

Tagging subscribers to this area: @tommcdon
See info in area-owners.md if you want to be subscribed.

Issue Details

Fixing errors to make dumps in RISC-V.

Part of #84834
cc @wscho77 @HJLeee @JongHeonChoi @t-mustafin @gbalykov @tomeksowi @sirntar @yurai007

Author: clamp03
Assignees: -
Labels:

area-Diagnostics-coreclr, community-contribution

Milestone: -

@clamp03 clamp03 self-assigned this Oct 12, 2023
@clamp03 clamp03 added the arch-riscv Related to the RISC-V architecture label Oct 12, 2023
@gbalykov
Copy link
Member

cc @viewizard

@clamp03 clamp03 changed the title [RISC-V][WIP] Fixing createdump for RISC-V [RISC-V] Fixing createdump for RISC-V Oct 18, 2023
@clamp03 clamp03 marked this pull request as ready for review October 18, 2023 02:25
@clamp03
Copy link
Member Author

clamp03 commented Oct 23, 2023

@jkotas Could you take a look at this PR? Thank you.

@clamp03 clamp03 requested a review from jkotas October 23, 2023 04:51
Comment on lines 134 to 141
#ifndef HOST_WINDOWS
// In windows, IMAGE_FILE_MACHINE_RISCV64 is not declared yet.
case IMAGE_FILE_MACHINE_RISCV64:
ulExpectedPointerSize = 8;
platform = CORDB_PLATFORM_POSIX_RISCV64;
break;
#endif // HOST_WINDOWS

Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
#ifndef HOST_WINDOWS
// In windows, IMAGE_FILE_MACHINE_RISCV64 is not declared yet.
case IMAGE_FILE_MACHINE_RISCV64:
ulExpectedPointerSize = 8;
platform = CORDB_PLATFORM_POSIX_RISCV64;
break;
#endif // HOST_WINDOWS
case IMAGE_FILE_MACHINE_RISCV64:
ulExpectedPointerSize = 8;
platform = CORDB_PLATFORM_POSIX_RISCV64;
break;

And instead add the following somewhere (src/coreclr/inc/clrint.h may be a good place):

#ifndef IMAGE_FILE_MACHINE_RISCV64
#define IMAGE_FILE_MACHINE_RISCV64           0x5064  // RISCV64
#endif

Copy link
Member Author

Choose a reason for hiding this comment

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

Thank you!

@jkotas
Copy link
Member

jkotas commented Oct 23, 2023

Thank you!

@jkotas jkotas merged commit e355697 into dotnet:main Oct 23, 2023
@clamp03 clamp03 deleted the fixcreatedump branch October 24, 2023 01:16
Copy link
Member

@gbalykov gbalykov left a comment

Choose a reason for hiding this comment

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

LGTM

@ghost ghost locked as resolved and limited conversation to collaborators Nov 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
arch-riscv Related to the RISC-V architecture area-Diagnostics-coreclr community-contribution Indicates that the PR has been added by a community member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants