-
-
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
JSON output is inconsistent between p
subcommands
#23012
Comments
Can you make a pr doing the changes to make both commands return the same structure? I agree on the change but will be easier for you to do it because you know whats different. Ill review it and see if that change affects any plugin or tool later and update the tests thanks! |
This issue is either going to be a hack or a bit of a rewrite. I worked on it a bit yesterday. The current behavior is that 'pdj' command calls I was changing disasm.c and cmd_print.inc.c so that all of the 'j' subcommands call This seemed to be working until I found that So I see 2 paths forward:
Make sense? Do you have a preference for a path forward? I think option 2 is a little more elegant imho. Along with a separate function for adding a new instruction to Man, this project is huge. Kudos to you for keeping it up solo for so long. Could use some tech debt cleanup though. |
One restriction is that we can't change public structure or function signatures, so having this in mind, both approaches look good, as one solves the problem quickier, so it may work for you sooner, but a proper rewrite/refactoring/cleanup is always welcome, everthing in r2land is prompt to be changed for the good. So my vote goes for the 2nd approach. If you need to break APIs you can use the R2_USE_NEW_ABI ifdef, and this code will be swapped before r2-6.0.0 is out (during the 5.9.9 development time) |
Ping |
@ttufts ping again, please go for the quickiest path to solve the issue, otherwise i have the feeling this issue will be stuck forever. as long as we have tests things can be always improved later. i just cant fix it becuae i lack your context and requirements |
Environment
Thu Jun 6 14:02:07 EDT 2024
radare2 5.9.3 32198 @ darwin-arm-64
birth: git.5.9.2-57-g6ad44b9c74 2024-06-05__16:47:07
commit: 6ad44b9
options: gpl -O2 cs:5 cl:2 make
Darwin arm64
Description
When parsing json output from
pdj
andpduoj
the json structure isn't the same.pduoj
dumps the text of the opcodes but doesn't parse the instructions into a helpful structure likepdj
does.Test
Load an ARM (32 in my case) binary, run
pdj 10
, runpduoj pop
, the pdj output has 'opcode' keys for each instruction, pduoj output only has 'text' keys for each instruction.The text was updated successfully, but these errors were encountered: