2009-01-01から1年間の記事一覧
gccで-m64オプションつけたら出力されるバイナリがだいぶ変わった 64bit用の命令をアセンブリと対応づける簡単なお仕事。。
gdb 起動中に"info registers"でレジスタの状態が見れる あと、makeもgdb中からできる
8b 55 e0 // movl 0xe0(%ebp), %edx 8b 45 e4 // movl 0xe4(%ebp), %eax 8b 4d dc // movl 0xdc(%ebp), %ecxc7 45 dc 01 00 00 00 // movl $0x00000001,0xdc(%ebp)55 // pushl %ebp 89 e5 // movl %esp, %ebp 83 ec 08 // subl $0x08, %esp
Intel CPUのアセンブラとオプコードの対応 nop -> 90 int3 -> cc
テスト