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
Initial implementation of heap parsing for Windows #14218
Conversation
802a17f
to
7c9dc6a
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.
this probably needs more eyes than the amount of time i've given it, it's a ton of code 👍 . can you add some tests?
Tested only on Windows 10 1809 x64 | ||
TODO: | ||
Clean/organize this: Order and Style | ||
-Can this be useful in unix? does mdmp even have a heap? remote dbg session? |
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.
yes! may be cool for remote debug!
It also might be integrated with WinDbg/KD support: |
Codecov Report
@@ Coverage Diff @@
## master #14218 +/- ##
==========================================
- Coverage 37.83% 37.83% -0.01%
==========================================
Files 949 949
Lines 305172 305240 +68
==========================================
+ Hits 115469 115475 +6
- Misses 189703 189765 +62
Continue to review full report at Codecov.
|
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.
.
#define WINDOWS_MAPS_H | ||
#include <r_core.h> | ||
|
||
R_API RList *w32_dbg_modules(RDebug *dbg); |
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.
public fcn namespacec violation
@@ -833,7 +617,7 @@ static RDebugPid *build_debug_pid(PROCESSENTRY32 *pe) { | |||
return ret; | |||
} | |||
|
|||
RList *w32_pids (int pid, RList *list) { | |||
RList *w32_pids(int pid, RList *list) { |
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.
why get a list to return it? just create it inside this funtion and remove the arg
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.
show_all_pids should be bool
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.
why get a list to return it? just create it inside this funtion and remove the arg
I checked and the equivalent functions for the other platforms also ask for a list. I wont change them because it is out of scope for this pr
libr/util/w32-sys.c
Outdated
@@ -27,6 +27,45 @@ static char *getexe(const char *str) { | |||
return argv0; | |||
} | |||
|
|||
R_API ut32 r_sys_get_winver() { |
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.
what about making this funcction generic and make it work with uname on unix systems too instead of being windows-specific
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.
@radare I implemented r_sys_get_osinfo(). Can you check to see if thats what you wanted?
Cool thanks! Lets wait for travis :) |
Only tested on Windows 10 x64, but at least the basics should work on every version.
Also please review