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

Windows crashdump fix and refactor #1449

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

gcmoreira
Copy link
Contributor

This PR addresses #1438.

Unfortunately, previously the code was messy and difficult to follow. I refactored the _load_segments() function by splitting it based on each dump type, adding docstrings and typing, removing hardcoded values, and cleaning up the code for improved readability and maintainability.

@atcuno Could you please test it thoroughly? It should be fine since I've only rearranged the code.

@gcmoreira gcmoreira requested a review from atcuno December 19, 2024 00:34
@gcmoreira gcmoreira changed the title Windows crashdump fix Windows crashdump fix and refactor Dec 19, 2024
Copy link
Member

@ikelos ikelos left a comment

Choose a reason for hiding this comment

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

Looks good to me, think we can reuse those constants in the crashinfo plugin too... I'll await @atcuno 's review just in case.

@@ -28,6 +28,9 @@ class WindowsCrashDump32Layer(segmented.SegmentedLayer):
SIGNATURE = 0x45474150
VALIDDUMP = 0x504D5544

DUMP_TYPE_FULL = 1
Copy link
Member

Choose a reason for hiding this comment

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

Crash info should probably make use of these constants (at the moment it hardcodes the values).

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.

2 participants