This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Decompilation
- From: Pop Sébastian <pop at gauvain dot u-strasbg dot fr>
- To: "J. Grant" <jg-lists at jguk dot org>
- Cc: gcc at gcc dot gnu dot org
- Date: Sat, 14 Dec 2002 23:06:00 +0100
- Subject: Re: Decompilation
- References: <3DF93E04.5020004@jguk.org>
Hi,
On Fri, Dec 13, 2002 at 01:55:16AM +0000, J. Grant wrote:
> Hello,
>
> I have been working on some decompilation research. I would like to test
> my ideas and if useful contribute them to a project like GCC.
>
> In this situation it is best for me to check if anyone else is working
> on decompilation type research before I start.
>
When I've contributed the switch to if translator some ideas have sparked
about how to recover switches from ifs once we lower intermediate
representations down to machine dependent instructions.
http://gcc.gnu.org/ml/gcc-patches/2002-05/msg00233.html
Another interesting idea that could serve also the optimizer and that comes
from decompilation world is the reconstruction of multidimensional arrays
from base+offset memory accesses.
I'm not sure wether there were other threads on gcc.gnu.org discussing ideas
about decompilation techniques (I have to httdig it).
A possible implementation of the disassembler would be to implement it
as a GCC front-end: construct ASTs from disassembled instructions,
recover high level representations (CFG, call-graphs, ...) and finally
use a pretty printer to write down a file in a high level language.
Or even use the TreeBrowser for studying and transforming ASTs.
> If anyone is, then perhaps I can contribute.
>
Certainly! This work will be welcome.