This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: How to know some info?
- From: Ian Lance Taylor <iant at google dot com>
- To: johncaponski <wolfomaster at yahoo dot es>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Mon, 02 Nov 2009 10:09:09 -0800
- Subject: Re: How to know some info?
- References: <26157754.post@talk.nabble.com>
johncaponski <wolfomaster@yahoo.es> writes:
> - What architecture was this code compiled for?
> - 32 or 64 bits?
> pushl %ebp
This is 32-bit x86 code. I don't know if there is any way to
recognize this except to, well, recognize it.
> In addition to that, I am asked to write the C programme that generated that
> code. Is there any automatic way to do that?
There are various decompiler programs which attempt to back from
object code to C, but they won't give you the C code which will
generate the exact assembler code. I don't know of any free software
decompiler programs, but I wouldn't be surprised if there are some.
Ian