获取给定函数的hexdump

时间:2015-12-04 17:14:07

标签: linux hexdump

我想获得给定函数的hexdump。到目前为止objdump -d a.out --start-address=0x400630 and --stop-address=0x400679是我找到的最佳解决方案,但是我不知道如何从输出中仅提取操作码。 例如:

  4003f0:   48 83 ec 08             sub    $0x8,%rsp
  4003f4:   e8 73 00 00 00          callq  40046c
  ...

我只需要这个:

  48 83 ec 08 
  e8 73 00 00 00 

2 个答案:

答案 0 :(得分:1)

您可以在程序中使用gdb,x/i会打印出一系列机器说明。

答案 1 :(得分:0)

也可以尝试切管:

  <application
        ...
        android:name="android.support.multidex.MultiDexApplication">
        ...
  </application>

您可能需要根据输出调整切割范围。