-
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Add: Generate Coredump - added support for threads and x86 #5104
Conversation
static bool dump_this_map(char *buff_smaps, ut64 start_addr, ut64 end_addr, bool file_backed, bool anonymous, ut8 perms, ut8 filter_flags) { | ||
char *p, *pp, *ppp, *extern_tok, *flags_str; | ||
char *identity = NULL; | ||
static bool dump_this_map(char *buff_smaps, unsigned long start_addr, unsigned long end_addr, |
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.
function signatures must fit in one line, do not indent like this. if you feel this function is having too many parameters groups them in a struct for info and use only modifiers as arguments, or another struct if there are many arguments.
This is how rust handles default parameters and variable argument functions. and it makes the function signatures more readable.
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.
K&R syntax solved this in a sugar way, which doesnt reduces the number of arguments, but drops type definitions from the signature line.
The patch looks good so far. i just added few syntax comments for future enhancements.. It will be awesome if you could port this to ARM, MIPS and POWERPC. I guess that ARM is the only one that really matters, but i dont think porting this to other archs would be difficult as only the register state will differ. |
About the core-loading thing, i implemented a bit of it for mach0 and elf, it shows an It will be good not to have to copypaste the arw line. I have tested it and it works on arm and x86 at least (on linux cores) |
Hi! Yeah, I tohough about port it to ARM and to other archs, but right now it's quite difficult because I'm on vacation and I don't have so many devices here, but once I'm back I'll work on it. I'll come back once I have something ;) |
👍
|
I've added support for threads and x86 systems to the "generate coredump" feature.
I've also cleaned up all debug stuff and tried to refactor as much code as possible.
It's still missing some minor checks like:
Once this is passed, i'll put my hands on "load coredumps"