rizinorg/rizin

ESIL to RZIL conversion

XVilka opened this issue · 5 comments

First stage

High-priority

  • librz/analysis/p/analysis_avr.c #1890
  • librz/analysis/p/analysis_arm_cs.c ARMv7 #2241
  • librz/analysis/p/analysis_arm_cs.c ARMv8 #2354
  • librz/analysis/p/analysis_ppc_cs.c #2823
  • librz/analysis/p/analysis_x86_cs.c #2747
  • librz/analysis/p/analysis_mips_cs.c by @brightprogrammer #3508
  • librz/analysis/p/analysis_mips_gnu.c (should be merged into mips_cs and removed) by @brightprogrammer
  • librz/analysis/p/analysis_riscv_cs.c

The rest

  • librz/analysis/p/analysis_bf.c
  • librz/analysis/p/analysis_6502.c
  • librz/analysis/p/analysis_sh.c #2518
  • librz/analysis/p/analysis_8051.c #2999
  • librz/analysis/p/analysis_wasm.c REMOVED #3497
  • librz/analysis/p/analysis_rsp.c REMOVED #3531
  • librz/analysis/p/analysis_v850.c by @imbillow
  • librz/analysis/p/analysis_v810.c by @imbillow
  • librz/analysis/p/analysis_sparc_cs.c by @DMaroo
  • librz/analysis/p/analysis_pic.c #3461
  • librz/analysis/p/analysis_h8300.c by @XVilka

Unassigned (free to pick up)

  • librz/analysis/p/analysis_xtensa.c
  • librz/analysis/p/analysis_gb.c

Second stage

  • Migrate all analysis steps from ESIL to RZIL
  • #3594
  • Debug/"emulation" engine based on RzIL instead of ESIL by default: #3676
  • Update Rizin book and documentation to refer to RZIL
  • Remove ESIL implementation
  • Remove ESIL documentation
  • Remove ESIL tests
  • Update GitHub labeler and other workflows

Cutter

Other

  • rz-ghidra (remove ESIL use)
  • jsdec
  • rz-retdec
  • ...

RzAnalysis

$ rg -t c "esil" librz/core/ -l
librz/analysis/serialize_analysis.c # isn't really used, relevant lines can be removed from the file
librz/analysis/var.c
librz/analysis/il/analysis_il_trace.c
librz/analysis/op.c # isn't really used, relevant lines can be removed from the file
librz/analysis/hint.c # isn't really used, relevant lines can be removed from the file
librz/analysis/analysis.c # isn't really used, relevant lines can be removed from the file
librz/analysis/fcn.c

RzDebug

librz/debug/p/debug_io.c
librz/debug/p/native/bt/generic-x64.c
librz/debug/p/native/bt/generic-x86.c
librz/debug/desil.c
librz/debug/trace.c

RzCore

$ rg -t c "esil" librz/core/ -l
librz/core/cprint.c # isn't really used, relevant lines can be removed from the file
librz/core/casm.c # isn't really used, relevant lines can be removed from the file
librz/core/cil.c
librz/core/analysis_objc.c 
librz/core/cdebug.c
librz/core/ctypes.c
librz/core/project_migrate.c # isn't really used, we should remove all ESIL-related information during the migration
librz/core/analysis_tp.c
librz/core/disasm.c 
librz/core/cmd_descs/cmd_descs.h # just remove no longer necessary command handlers
librz/core/tui/visual.c # isn't really used, relevant lines can be removed from the file
librz/core/cmd_descs/cmd_descs.c # just remove no longer necessary command handlers
librz/core/tui/esil.c # This one can be simply removed
librz/core/tui/biteditor.c # Should print RzIL instead
librz/core/tui/panels.c # Should be substituted with RzIL emulation
librz/core/cconfig.c # ESIL relevant options and callbacks could be removed, new options for RzIL should be created
librz/core/agraph.c # isn't really used, relevant lines can be removed from the file
librz/core/core_private.h # isn't really used, relevant lines can be removed from the file
librz/core/cesil.c # This one can be simply removed 
librz/core/cmd/cmd_debug.c
librz/core/cmd/cmd_search.c
librz/core/canalysis.c 
librz/core/cmd/cmd_search_rop.c
librz/core/cmd/cmd_print.c
librz/core/cmd/cmd_analysis.c

As I see rsp plugin is untested and unmaintained. Maybe we should move it to the extras?

Better first check if it can be made tested and working without too much effort.

I want to work on this issue please assign me this issue!..

@Gauravjadhav22 go ahead. Look at how AVR was converted and I recommend taking RSP (librz/analysis/p/analysis_rsp.c) architecture - it's simple enough for a start.