Skip to content

Support offset/addr fields in aflj/afij and basic blocks #350

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

Merged
merged 2 commits into from
May 12, 2025

Conversation

trufae
Copy link
Contributor

@trufae trufae commented Apr 30, 2025

i have introduced some breaking changes in r2 structs and json objects. in this case offset is now named "addr" for function and basic blocks. im not sure if this is the most elegant way to handle that in r2dec, but that patch works with latest r2

@trufae
Copy link
Contributor Author

trufae commented May 11, 2025

ping

@@ -262,10 +262,21 @@ export default (function() {
var isfast = !r2pipe.bool('e r2dec.slow');
this.arch = r2_arch();
this.bits = r2pipe.int('e asm.bits', 32);
function aflj() {
Copy link
Owner

Choose a reason for hiding this comment

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

Define this outside

@@ -26,9 +26,9 @@ var create_fcn_data = function(x) {
return null;
}
return {
offset: x.offset,
offset: x.offset?? x.addr,
Copy link
Owner

Choose a reason for hiding this comment

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

Isn't better to invert?

name: x.name,
calltype: x.calltype,
calltype: x.calltype?? x.callconv,
Copy link
Owner

Choose a reason for hiding this comment

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

Same here

@wargio
Copy link
Owner

wargio commented May 11, 2025

Looks like I never sent the comments. Sorry it's the stupid mobile github app.

@trufae
Copy link
Contributor Author

trufae commented May 11, 2025

done.

@trufae trufae mentioned this pull request May 11, 2025
10 tasks
@wargio wargio merged commit 3689233 into wargio:master May 12, 2025
4 checks passed
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.

3 participants