Repository navigation
Adapt to rizin API changes and update color parsing to ecj - #83
Merged
Merged
Conversation
wargio
approved these changes
Oct 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ecjinstead ofec*for parsing colors insidejs/llibdecprinter.js:12 - initializeColors(). Used LLM for this so might be worth verifying that the logic is correctHowever after these changes its crashing on alot more functions than it used to. Not sure if something changed internally in rizin that is causing this
Test (/bin/ls macos arm64)
1- Install jsdec
2-
rizin -q -c "aa; s entry0; pddA" /bin/lsOn Cutter it says: "Failed to parse JSON from jsdec"
Works fine against Cutter 2.5.0 release binary for macos arm64
Some functions do produce correct output though
rizin -q -c "aa; s 0x100000700; pddA" /bin/ls{"code":"/* jsdec pseudo code output */\n/* /bin/ls @ 0x100000700 */\n#include <stdint.h>\n \nvoid func_100000700 (int64_t arg1, int64_t arg2) {\n x0 = arg1;\n x1 = arg2;\n /* [00] -r-x section size 15268 named 0.__TEXT.__text */\n x0 += 0x68;\n x1 += 0x68;\n return void (*0x100004684)() ();\n}\n","annotations":[{"start":0,"end":30,"type":"offset","offset":"4294969088"},{"start":0,"end":30,"type":"syntax_highlight","syntax_highlight":"comment"},{"start":31,"end":58,"type":"offset","offset":"4294969088"},{"start":31,"end":58,"type":"syntax_highlight","syntax_highlight":"comment"},{"start":59,"end":78,"type":"offset","offset":"4294969088"},{"start":59,"end":78,"type":"syntax_highlight","syntax_highlight":"comment"},{"start":79,"end":80,"type":"offset","offset":"4294969088"},{"start":81,"end":131,"type":"offset","offset":"4294969088"},{"start":81,"end":85,"type":"syntax_highlight","syntax_highlight":"datatype"},{"start":86,"end":100,"type":"syntax_highlight","syntax_highlight":"function_name"},{"start":86,"end":100,"type":"function_name","name":"sym.func.100000700","offset":"4294969088"},{"start":102,"end":109,"type":"syntax_highlight","syntax_highlight":"datatype"},{"start":110,"end":114,"type":"local_variable","name":"arg1"},{"start":110,"end":114,"type":"syntax_highlight","syntax_highlight":"local_variable"},{"start":116,"end":123,"type":"syntax_highlight","syntax_highlight":"datatype"},{"start":124,"end":128,"type":"local_variable","name":"arg2"},{"start":124,"end":128,"type":"syntax_highlight","syntax_highlight":"local_variable"},{"start":132,"end":146,"type":"offset","offset":"4294969088"},{"start":141,"end":145,"type":"syntax_highlight","syntax_highlight":"local_variable"},{"start":141,"end":145,"type":"local_variable","name":"arg1"},{"start":147,"end":161,"type":"offset","offset":"4294969088"},{"start":156,"end":160,"type":"syntax_highlight","syntax_highlight":"local_variable"},{"start":156,"end":160,"type":"local_variable","name":"arg2"},{"start":162,"end":222,"type":"offset","offset":"4294969088"},{"start":162,"end":222,"type":"syntax_highlight","syntax_highlight":"comment"},{"start":223,"end":238,"type":"offset","offset":"4294969088"},{"start":233,"end":237,"type":"syntax_highlight","syntax_highlight":"constant_variable"},{"start":233,"end":237,"type":"constant_variable","offset":"104"},{"start":239,"end":254,"type":"offset","offset":"4294969092"},{"start":249,"end":253,"type":"syntax_highlight","syntax_highlight":"constant_variable"},{"start":249,"end":253,"type":"constant_variable","offset":"104"},{"start":255,"end":291,"type":"offset","offset":"4294969096"},{"start":259,"end":265,"type":"syntax_highlight","syntax_highlight":"keyword"},{"start":266,"end":270,"type":"syntax_highlight","syntax_highlight":"datatype"},{"start":273,"end":284,"type":"syntax_highlight","syntax_highlight":"constant_variable"},{"start":273,"end":284,"type":"constant_variable","offset":"4294985348"},{"start":292,"end":293,"type":"offset","offset":"4294969096"}]}Above command produces output only on pddA, no output on pdd and pddj for some reason
pddi output:
jsdec-issue.txt