r2dec-js icon indicating copy to clipboard operation
r2dec-js copied to clipboard

Improvements in syntax

Open radare opened this issue 7 years ago • 1 comments

Ideally r2dec should output C-style code using the coding style of r2:

  • [x] } else {
  • [x] no empty lines
  • [x] Simplify pointers with no delta *((int64_t*) rax) = 0; -> *rax=0
  • [ ] use ut64 instead of uint64_t and so on (? as an option)
  • [ ] no ennecessary return statements
  • [ ] != 0 is implicit, just if (eax)
  • [ ] Implicit casts and pointer cleanup
                    rdi = *((int64_t*) rbx + 0x138);

because acording to the regprofile rbx is 64bit in size must be.

               rdi = rbx[0x138];
screen shot 2018-04-11 at 23 30 18

a.json.zip

radare avatar Apr 11 '18 21:04 radare

the empty lines one is a bug introduced with html (i think).

wargio avatar Apr 11 '18 21:04 wargio