gdb-disassemble

8 篇文章 0 订阅
1 篇文章 0 订阅
moss@moss-PC:~$ cd Linux_Programming/ moss@moss-PC:~/Linux_Programming$ gcc -o test test.c moss@moss-PC:~/Linux_Programming$ gdb ./test GNU gdb (GDB) 7.2-ubuntu Copyright (C) 2010 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "i686-linux-gnu". For bug reporting instructions, please see: ... Reading symbols from /home/moss/Linux_Programming/test...(no debugging symbols found)...done. (gdb) disassemble main Dump of assembler code for function main: 0x08048459 <+0>: push %ebp 0x0804845a <+1>: mov %esp,%ebp 0x0804845c <+3>: and $0xfffffff0,%esp 0x0804845f <+6>: sub $0x10,%esp 0x08048462 <+9>: movl $0x8048552,0x4(%esp) 0x0804846a <+17>: movl $0x7b,(%esp) 0x08048471 <+24>: call 0x8048414 0x08048476 <+29>: leave 0x08048477 <+30>: ret End of assembler dump. (gdb) x/s 0x08048471 0x8048471 : "/350/236/377/377/377/311Ð/220/220/220/220/220/220/220U/211/345]Ít&" (gdb) x/s 0x08048476 0x8048476 : "/311Ð/220/220/220/220/220/220/220U/211/345]Ít&" (gdb) x/s 0x0804846a 0x804846a : "/307/004${" (gdb) x/s 0x08048462 0x8048462 : "/307D$/004R/205/004/b/307/004${" (gdb) x/s 0x8048552 0x8048552: "yaho!" (gdb) 0x8048558 <__FRAME_END__>: "" (gdb) diassemble function Undefined command: "diassemble". Try "help". (gdb) disassemble function Dump of assembler code for function function: 0x08048414 <+0>: push %ebp 0x08048415 <+1>: mov %esp,%ebp 0x08048417 <+3>: sub $0x48,%esp 0x0804841a <+6>: mov 0xc(%ebp),%eax 0x0804841d <+9>: mov %eax,-0x2c(%ebp) 0x08048420 <+12>: mov %gs:0x14,%eax 0x08048426 <+18>: mov %eax,-0xc(%ebp) 0x08048429 <+21>: xor %eax,%eax 0x0804842b <+23>: mov $0x8048540,%eax 0x08048430 <+28>: mov -0x2c(%ebp),%edx 0x08048433 <+31>: mov %edx,0x8(%esp) 0x08048437 <+35>: mov 0x8(%ebp),%edx 0x0804843a <+38>: mov %edx,0x4(%esp) 0x0804843e <+42>: mov %eax,(%esp) 0x08048441 <+45>: call 0x8048338 0x08048446 <+50>: mov -0xc(%ebp),%edx 0x08048449 <+53>: xor %gs:0x14,%edx 0x08048450 <+60>: je 0x8048457 0x08048452 <+62>: call 0x8048348 <__stack_chk_fail@plt> 0x08048457 <+67>: leave 0x08048458 <+68>: ret End of assembler dump. (gdb)
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值