-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
WIP: Initial support for UF2 file format #io #23117
Conversation
You cant use anal or core from io. Use the coreb struct or so _r_core_cmdf, referenced from: |
libr/io/p/io_uf2.c
Outdated
} | ||
|
||
static bool uf2_read(RIO *io, RBuffer *rbuf, char *buf) { | ||
|
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.
empty line
libr/io/p/io_uf2.c
Outdated
} | ||
|
||
comment = r_str_newf ("uf2 block #%02d (%d bytes @ 0x%08x)\n", block.blockNo, block.payloadSize, block.targetAddr); | ||
r_meta_set_string (core->anal, R_META_TYPE_COMMENT, block.targetAddr, comment); |
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.
use io->coreb.cmdf (core, comment);
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.
where comment must start with "CC ...
aka contain the command that adds a comment
libr/io/p/io_uf2.c
Outdated
return -1; | ||
} | ||
|
||
static void process_family_id(RCore *core, ut32 family_id) { |
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.
static void process_family_id(RCore *core, ut32 family_id) { | |
static void process_family_id(RIO *io, ut32 family_id) { |
pass io, this way the function have also access to the RCoreBind struct and call io->coreb.cmdf(io->coreb.core, ...)
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.
fixed some code injection bugs
Description
Initial uf2:// io plugin.
Many functionalities still need to be implemented (write, checksum validation, file container, ...)