Skip to content
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

Added command to print current section in JSON #7490

Merged
merged 1 commit into from
May 14, 2017
Merged

Added command to print current section in JSON #7490

merged 1 commit into from
May 14, 2017

Conversation

adrianherrera
Copy link
Contributor

I find that this is useful when I am working with r2pipe. I couldn't decide if "S.j" or "Sj." was more appropriate, any thoughts? Likewise if you don't think this is useful, please let me know :)

r_cons_printf ("{\"start\":%" PFMT64u ",\"end\":%" PFMT64u ",\"name\":\"%s\"}",
s->paddr + s->vaddr,
s->paddr + s->vaddr + s->size,
s->name);
Copy link
Collaborator

Choose a reason for hiding this comment

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

may be worth escaping the string to avoid invalid json

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@wargio
Copy link
Contributor

wargio commented May 14, 2017

Isn't missing a , at the end of each loop?

@adrianherrera
Copy link
Contributor Author

No. It will only ever print once because of the break statement.

@radare radare merged commit c7cc81e into radareorg:master May 14, 2017
@radare
Copy link
Collaborator

radare commented May 14, 2017

Thanks!

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