radareorg / radeco

radare2-based decompiler and symbol executor
367 stars 54 forks source link

Predicates for Conditional Branch Instructions #155

Open ZhangZhuoSJTU opened 6 years ago

ZhangZhuoSJTU commented 6 years ago

I need some time to catch you guys up. What an amazing progress you have taken!

Right now, I think we might need to get the predications for conditional branch instructions (Something like eax < ebx), which might be very useful in several analysis stages including VSA I will rewrite these days. And no matter when, we will need these information for the decompilation output.

However, conditional flag registers are architecture-depended, so the design will also be architecture-depended. My initial ideas goes:

  1. Add new analysis stages named analysis/conditions/, which goes like analysis/conditions/x86, analysis/conditions/arm and something else. (Or other better names)

  2. Later, we could use RadecoProject to specify which analyzer to use.

Any suggestions?

ZhangZhuoSJTU commented 6 years ago

To tell the truth, we are always going to met some problems which depended on architectures, and need some architecture-depended analyzer. Does it work if we use RadecoProject to specify these analyzers and backends? @sushant94 @XVilka

XVilka commented 6 years ago

@ZhangZhuoSJTU from my PoV yes, using RadecoProject is the preffered way. Not sure if it works right now though.

ZhangZhuoSJTU commented 6 years ago

@XVilka I see. I am checking these in RadecoProject. @sushant94 suggested me to write some llanalyzer, which I think it is a good idea. Working on it.