RDV+DIAL chat illimit� dans ta r�g!
no save
Assistance
Achat
News

Forum | programmation
du C en asm
kokliko, le ven. 25 févr. 2005 à 11:57:20
bonjour tout le monde !

voila, j'aimerai savoir si c'etait possible par un tools ou autre de rendre un code C en asm.
Par exemple gdb, il met vraiment en asm ?

test :

voici un ptit prog c :


---------------------
#include <stdio.h>

int main()
{
printf("hello\n");
}
---------------------

bash-2.05b$ hw
hello
bash-2.05b$ gdb hw
GNU gdb 6.1.1
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i486-slackware-linux"...Using host libthread_db library "/lib/libthread_db.so.1".

(gdb) disassemble main
Dump of assembler code for function main:
0x08048384 <main+0>: push %ebp
0x08048385 <main+1>: mov %esp,%ebp
0x08048387 <main+3>: sub $0x8,%esp
0x0804838a <main+6>: and $0xfffffff0,%esp
0x0804838d <main+9>: mov $0x0,%eax
0x08048392 <main+14>: sub %eax,%esp
0x08048394 <main+16>: sub $0xc,%esp
0x08048397 <main+19>: push $0x8048474
0x0804839c <main+24>: call 0x80482b0 <_init+56>
0x080483a1 <main+29>: add $0x10,%esp
0x080483a4 <main+32>: leave
0x080483a5 <main+33>: ret
0x080483a6 <main+34>: nop
0x080483a7 <main+35>: nop
0x080483a8 <main+36>: nop
0x080483a9 <main+37>: nop
0x080483aa <main+38>: nop
0x080483ab <main+39>: nop
0x080483ac <main+40>: nop
0x080483ad <main+41>: nop
0x080483ae <main+42>: nop
0x080483af <main+43>: nop
---Type <return> to continue, or q <return> to quit---
End of assembler dump.


Si je veux rendre ce petit code en asm, je peux le faire via cet outil ?
Si oui, comment ?
Si non, existe t'il une methode ?


merci de votre comprehension
a+


Reeter
févr. 05
Suivant
REPONSES
Reeter
févr. 05
kokliko
févr. 05
Reeter
févr. 05
kokliko
mars 05
me
mai 07
ekra
mai 07
Version Web
Réalisé par RedShift
no save