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

chore: Add useful information to certain Error variants #393

Merged
merged 2 commits into from
Dec 18, 2023

Conversation

xxuejie
Copy link
Collaborator

@xxuejie xxuejie commented Dec 15, 2023

This commit revisits Error type with additional information that would help debugging, such as addresses to access in memory errors, and segment vaddr in Elf errors.

To preserve the required information, one additional assembly line is required in each WRITE operation of x64 implementation. The arm64 code does not suffer from any additional assembly code, in fact, we also took the liberty to reduce a few unnecessary arm64 assembly lines.

This commit revisits Error type with additional information that would
help debugging, such as addresses to access in memory errors, and
segment vaddr in Elf errors.

To preserve the required information, one additional assembly line is
required in each WRITE operation of x64 implementation. The arm64 code
does not suffer from any additional assembly code, in fact, we also
took the liberty to reduce a few unnecessary arm64 assembly lines.
src/machine/asm/mod.rs Outdated Show resolved Hide resolved
Copy link
Collaborator

@mohanson mohanson left a comment

Choose a reason for hiding this comment

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

LGTM

@mohanson mohanson merged commit 05542c8 into nervosnetwork:develop Dec 18, 2023
11 checks passed
@xxuejie xxuejie deleted the error-revisit branch December 18, 2023 02:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants