如何让 objdump -D 只在 Windows 中显示特定功能?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/3518930/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to make objdump -D only display specific function in Windows?
提问by Elliott
I want to display the machine code of a specific function. For example, in Linux I would enter:
我想显示特定函数的机器码。例如,在 Linux 中我会输入:
objdump -D x.out | grep -A20 main.:
What would the equivalent be in Windows?
Windows 中的等价物是什么?
采纳答案by Dummy00001
What would the equivalent be in windows?
Windows 中的等价物是什么?
Off the top of head, you just save the output into a file:
最重要的是,您只需将输出保存到一个文件中:
objdump -D x.out > x.out.dump
then open the file (x.out.dump
) in the text editor of choice.
然后x.out.dump
在选择的文本编辑器中打开文件 ( )。
On Windows to peek into the object code I find myself mostly using GUI debuggers. Windows is not very command-line friendly environment. Otherwise, you might want to install the CygWin, start bash in terminal or the cmd.exe and use the grep as if you were under Linux.
在 Windows 上查看目标代码时,我发现自己主要使用 GUI 调试器。Windows 的命令行环境不是很友好。否则,您可能想要安装CygWin,在终端或 cmd.exe 中启动 bash 并像在 Linux 下一样使用 grep。