-
-
Notifications
You must be signed in to change notification settings - Fork 354
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
Fix endianness for win pagedump and winkd #3204
Conversation
27930e7
to
e68285b
Compare
479df09
to
4bb8861
Compare
Test |
@GustavoLCR can you check that i didn't break the windows debugger ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amazing job! I didn't realize so many changes are necessary for DMP to work on BE systems. From the code point of view everything looks fine aside that code duplication, but this one isn't critical at all. We should wait for @GustavoLCR feedback or test debugger on Windows ourselves.
@ITAYC0HEN could you please help us with that?
return uc; | ||
} | ||
|
||
static Win64UnwindInfo *windows_x64_unwind_info_new(RzDebug *dbg, ut64 at) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if it's possible to get rid of this code duplication
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's not really code duplication since the native debugger needs the UnwindCode data, meanwhile the other one does not. but i see your point
586e497
to
702bdef
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know anything about the formats themselves, but overall lgtm.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not a lot to comment, sorry, it's code I'm not familiar with at all.
@@ -34,9 +42,11 @@ RZ_API RZ_OWN RzBitmap *rz_bitmap_new(size_t len) { | |||
|
|||
RZ_API void rz_bitmap_set_bytes(RZ_NONNULL RzBitmap *b, RZ_NONNULL const ut8 *buf, size_t len) { | |||
rz_return_if_fail(b && buf && len >= 0); | |||
if (b->length < len) { | |||
len = b->length; | |||
size_t blen = b->length << BITWORD_BITS_SHIFT; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isn't it better to use BITMAP_WORD_COUNT on len
and compare that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is the same.
I tested this on Windows 10 x64 with all updates installed. Basic features of the debugger seem to work as well as on
The only problem I met is that prompt offset doesn't update sometimes after I think it's safe to merge. |
SQUASH ME
Your checklist for this pull request
Detailed description
This PR fixes the endianness issues on Windows pagedmp (DMP) parsing and loading into the debugger and some endianness issues linked to WinKD.
Also Fix arm32 windows profile (ARM_MAX_WATCHPOINTS == 1 not 2)
Test plan
db/formats/dmp/dmp
tests must pass on s390x travisCloses #297